Sie sind nicht angemeldet.
Zitat
<UserControl
x:Name="this"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<!--Simpe databinding example-->
<!--1. set up connection for this item (ie. temperature sensor)-->
<!--2. bind values to your own usercontrol-->
<!--Binding example-->
<!--Content="{Binding ElementName=this, Path=DataContext.Value, FallbackValue=no data available}"-->
<!--default background-->
<Rectangle Grid.Row="0" Grid.RowSpan="2" Style="{StaticResource GadgetBackgroundStyle}"/>
<!--Content: binding to source value: -->
<!--Content: ElementName=this -->
<!--Content: Path=DataContext.Value, for connetion to actual connected value -->
<TextBlock
Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat='dd/MM/yyyy hh:mm tt'}"
Grid.Row="1"
Opacity="1.0"
Height="Auto"
Width="Auto"
Foreground="#FF000000"
FontSize="15"
FontFamily="Segoe UI"
FontWeight="Normal"
Margin="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</UserControl>
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »InfoSeeker« (7. August 2022, 15:16)
I made a rudimentary time display for a display page.
- a short video
- import time.page ([attach]9581[/attach])
Wow! Thank you. That's what I was trying to do (and failing miserably). I will take a long hard look at your code. In the first bit of code that you posted, I noticed that a lot of the stuff at the top is the same as in the presets. The line of interest is Text="{Binding Source={xtatic sysateTime.Now}, StringFormat='dd/MM/yyyy hh:mm tt'}". I tried pasting that line into a preset tied to Seconds and it did count up. In the page file you provided I see <connection>service_data:1:data\sensor\systemtime/sec</connection> There is a lot more that is above my understanding but I think if I spend some time going through it slowly, and Google up some XAML code help, I can figure it out. I will want to change the text color and probably the font. I think this and location etc. are set up in the top portion of the code. I wonder how fast I will break it?I made a rudimentary time display for a display page.
- a short video
- import time.page ([attach]9581[/attach])
Zitat
<UserControl
x:Name="this"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<!--default background-->
<Rectangle Style="{StaticResource GadgetBackgroundStyle}"/>
<!--user defined text-->
<!--Content: contains the displayed text-->
<TextBlock
Text=" : "
Opacity="1.0"
Height="auto"
Width="auto"
Foreground="#ffffffff"
Background="#000000"
FontSize="22"
FontFamily="Segoe UI"
FontWeight="Normal"
Margin="0,0,0,0"
Padding="0,0,0,0"
HorizontalAlignment="left"
VerticalAlignment="Center"/>
</Grid>
</UserControl>
The binding effort was fail because I do not know how to loop the pertinent section for updating.
Zitat
<UserControl
x:Name="this"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock
Text="{Binding ElementName=this, Path=DataContext.Value, FallbackValue=no data available, StringFormat={}{0:00}}"
Grid.Row="0"
Opacity="1.0"
Height="Auto"
Width="Auto"
Foreground="#FFFFFFFF"
FontSize="22"
FontFamily="Segoe UI"
FontWeight="Bold"
Margin="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</UserControl>
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »WinstonWoof« (9. August 2022, 08:06)
Yeah I know this is kind of pointless. I want to put the time of day in the Overview page because I can glance over at it while I am watching TV (can't see my main displays from that location). I could just look at my watch but its not near as much fun.I use the clock in the bottom right of my taskbar ;o)
Thank you. I tried this code and it works, and has the leading zero. The Text="{Binding line of code is quite different than InfoSeeker's. His looks like it does a system call:
Just had a quick play and using the below (in an xaml block) adapted from an XAML input using Data Binding + Conditions and a guess at how the StringFormat worked the below will display seconds, minutes or hours (depending on the data input selected) with a leading 0[
Thank you!! I don't see this in X.57 so I assume by next version you mean X.58. I tried pasting this line of code into Winston Woof's code, in place of the Binding Element line he had. It didn't work, probably because I don't really know what I am doing.In the next aquasuite version it is possible to use date and time in the code/XAML controls. The time will then update automatically.
Quellcode
1 <TextBlock Text="{Binding Path=TimeNow, StringFormat='dddd, dd MMMM yyyy HH:mm:ss'}" Foreground="White"/>
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Speedy-VI« (10. August 2022, 05:37)
Thank you for the clarification. I will look forward to trying the new feature in X.58. I also remain hopeful that you will add RGBpx port synchronization which was mentioned in a single post several moths ago as something that would be coming in a future release. I have 2 Farbwerk360's and would really like to be able to sync their ports. One of the great things about Aquasuite is that it just keeps getting better!the current version is 57, the next 58.I assume by next version you mean X.58
currently the binding with time work only once. the time dosent refresh. We have added also a few samples in the xaml presets how to use the time.
OK thanks for the update. I will keep waiting. In my opinion, the ability to sync RGBpx ports, at least between Farbwerk360's, would be a huge improvement. The Farbwerk360 has an aquabus connector on it that the owner's manual says is reserved for future use. I wonder if this header is connected to a serial UART and if it could be used to carry a sync signal between 2 Farbwerk360's. This would inherently be limited to syncing 2 Farbwerk360's and inferior to a solution that allowed syncing between any/all RGBpx ports, but its better than nothing, assuming the aquabus connector could be used for sync at all.No, not in the next month.I also remain hopeful that you will add RGBpx port synchronization
-