You are not logged in.
Dear visitor, welcome to Aqua Computer Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
<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 ElementName=this, Path=DataContext.Value, FallbackValue=no data available}" Grid.Row="0" 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" /> <!--Content: binding to source value: --> <!--Content: ElementName=this --> <!--Content: Path=DataContext.DataName, for connetion to actual connected value name --> <TextBlock Text="{Binding ElementName=this, Path=DataContext.DataName, FallbackValue=no data available}" 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> |
Source code |
|
1 |
CPU 4% | 38°C | 29,3W |
This post has been edited 3 times, last edit by "Saint" (Aug 15th 2019, 8:44pm)
This post has been edited 1 times, last edit by "Taubenhaucher" (Aug 22nd 2019, 7:15pm)
warum nicht, es gibt ja auch genug vorlagen die man modifizieren kann.das bei rund 500 Leuten noch keiner die Funktion
du kannst je Element nur eine Datenquelle verbinden.
es gibt auch eine Datei mit Templaten wenn du eine vorlage importierst, da findest du auch viele Beisppiele mit individuellem XAML code.
Sonst stelle deine Frage konkreter. Was geht nicht? Hast du Dir schon mal alle vorlagen angeschaut. Da muss man auch mal ein wenig mit experimentieren. Du wirst niemand finden der dir das so macht wie du es haben willst.
Na gut, dann wollen Dich wohl alle 470 Threadanschauer dissen!?
Jetzt mal ehrlich, wie wahrscheinlich ist das
Manchmal sind die Dinge einfach wie sie sind, ohne Hintergedanken, auch wenn man es gerne anders hätte
This post has been edited 2 times, last edit by "Saint" (Aug 23rd 2019, 1:31pm)
du kannst EINE Datenquelle pro Element verwenden.man kann aber doch sicher mehrere elemente davon in eine tabelle bekommen oder nicht ?
Source code |
|
1 |
DataContext.Value |
Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<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> <TextBlock Text="{Binding ElementName=this, Path=DataContext.Value, FallbackValue=no data available}" Foreground="White" FontSize="15"/> </Grid> </UserControl> |
Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
<?xml version="1.0" encoding="utf-8"?> <SettingsGroup xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Name>Page</Name> <GridSize>10</GridSize> <Items> <SettingsBase xsi:type="SettingsXamlItem"> <X>310</X> <Y>210</Y> <Height>40</Height> <Width>90</Width> <ZOrder>1</ZOrder> <Opacity>1</Opacity> <SnapToGrid>true</SnapToGrid> <GridSize>10</GridSize> <connection>service_data:1:data\sensor\aquamonitor//cpu/0/temperature/0_0</connection> <itemType>XamlControl</itemType> <font> <size>22</size> <w>Normal</w> <st>Normal</st> <f>Segoe UI</f> <col>#ff000000</col> </font> <xamlCode><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> <TextBlock Text="{Binding ElementName=this, Path=DataContext.Value, FallbackValue=no data available}" Foreground="White" FontSize="15"/> </Grid> </UserControl></xamlCode> </SettingsBase> </Items> </SettingsGroup> |
Source code |
|
1 |
<connection>service_data:1:data\sensor\aquamonitor//cpu/0/temperature/0_0</connection> |
Source code |
|
1 |
Text="{Binding ElementName=this, Path=service_data:1:data\sensor\aquamonitor//cpu/0/temperature/0_0, FallbackValue=no data available}" |
Quoted
service_data:1:data\sensor\aquamonitor//cpu/0/temperature/0_0
This post has been edited 1 times, last edit by "Saint" (Aug 23rd 2019, 3:12pm)
das geht nicht.Text="{Binding ElementName=this, Path=service_data:1:data\sensor\aquamonitor//cpu/0/temperature/0_0, FallbackValue=no data available}"
Source code |
|
1 |
service_data:1:data\sensor\aquamonitor//cpu/0/temperature/0_0 |
-