Hi,
I’m going to point out now that have shown me it 10 times, because if not I dizziness. The issue is the next, when you fight with WPF, Silverlight, or any other technology to make excessive use of formats with tags, because the theme of the Edition text can be quite complicated. A great “visual” solution for these cases is to take advantage of the formatting that it offers Visual Studio, where an attribute is separated by line. This option is activated from the menu [Tools / / Options], in the section [Text Editor / / XAML / / Formatting / / Spacing] the option selected [Position each attribute on separate line ]]
For example, returning to the example I posted 2 days ago we can see part of the XAML in this format
1: <TextBlock Text="Merry Christmas" Grid.Row="0" Grid.Column="1" FontSize="24" Foreground="White"
2: FontFamily="Segoe UI Semilight" FontWeight="Bold" Margin="0" HorizontalAlignment="Center" />
3: <Canvas x:Name="canvasContent" Margin="10,10,0,0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="2">
4: <Grid Grid.Column="1" Grid.Row="1"><Border BorderThickness="3" BorderBrush="White" CornerRadius="10"
5: Padding="2" HorizontalAlignment="Center" VerticalAlignment="Center"> <Grid>
6: <Border x:Name="mask" Background="White" CornerRadius="7" /> <StackPanel><StackPanel.OpacityMask>
7: <VisualBrush Visual="{Binding ElementName=mask}" /></StackPanel.OpacityMask><Image x:Name="CameraViewer"
8: Stretch="UniformToFill" MaxWidth="640" MaxHeight="480" /></StackPanel></Grid></Border></Grid>
Or after a Ctrl+k, CTRL + d, we see it in a more “natural” way
1: <TextBlock Text="Merry Christmas"
2: Grid.Row="0"
3: Grid.Column="1"
4: FontSize="24"
5: Foreground="White"
6: FontFamily="Segoe UI Semilight"
7: FontWeight="Bold"
8: Margin="0"
9: HorizontalAlignment="Center" />
10: <Canvas x:Name="canvasContent"
11: Margin="10,10,0,0"
12: Grid.Row="0"
13: Grid.Column="0"
14: Grid.RowSpan="2">
15: <Grid Grid.Column="1"
16: Grid.Row="1">
17: <Border BorderThickness="3"
18: BorderBrush="White"
19: CornerRadius="10"
20: Padding="2"
21: HorizontalAlignment="Center"
22: VerticalAlignment="Center">
23: <Grid>
24: <Border x:Name="mask"
25: Background="White"
26: CornerRadius="7" />
27: <StackPanel>
28: <StackPanel.OpacityMask>
29: <VisualBrush Visual="{Binding ElementName=mask}" />
30: </StackPanel.OpacityMask>
31: <Image x:Name="CameraViewer"
32: Stretch="UniformToFill"
33: MaxWidth="640"
34: MaxHeight="480" />
35: </StackPanel>
36: </Grid>
37: </Border>
38: </Grid>
39: <ContentControl x:Name="contentControlHat1">
40: <Image x:Name="imageHat1"
41: Width="64"
42: Height="64"
43: Source="/ElBruno.KinectViewer;component/Images/santa-hat.png"
44: Visibility="Hidden" />
45: </ContentControl>
Anyways, that tastes there is nothing written and perhaps this option more than one does not like, because well… here there is an option to test and choose.
Greetings @ Home
The Bruno


Leave a comment