mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-07 16:06:07 +02:00
Merge pull request #1149 from dotnet/publish-15046
This commit is contained in:
@@ -14,7 +14,7 @@ ms.assetid: 241c1ce2-60f8-4613-a0ec-9b9bb25fb6af
|
|||||||
|
|
||||||
A <xref:System.Windows.Controls.Label> provides both functional and visual support for access keys. It is frequently used to enable quick keyboard access to controls such as a <xref:System.Windows.Controls.TextBox>. To assign a <xref:System.Windows.Controls.Label> to a <xref:System.Windows.Controls.Control>, set the <xref:System.Windows.Controls.Label.Target%2A?displayProperty=nameWithType> property to the control that should get focus when the user presses the access key.
|
A <xref:System.Windows.Controls.Label> provides both functional and visual support for access keys. It is frequently used to enable quick keyboard access to controls such as a <xref:System.Windows.Controls.TextBox>. To assign a <xref:System.Windows.Controls.Label> to a <xref:System.Windows.Controls.Control>, set the <xref:System.Windows.Controls.Label.Target%2A?displayProperty=nameWithType> property to the control that should get focus when the user presses the access key.
|
||||||
|
|
||||||
The following image shows a <xref:System.Windows.Controls.Label> "Themes" that targets a <xref:System.Windows.Controls.ComboBox>. When the user presses , the <xref:System.Windows.Controls.ComboBox> receives focus. For more information, see [How to: Set the Target Property of a Label](/previous-versions/dotnet/netframework-3.5/ms752101(v=vs.90)).
|
The following image shows a <xref:System.Windows.Controls.Label> "Theme" that targets a <xref:System.Windows.Controls.ComboBox>. When the user presses <kbd>T</kbd>, the <xref:System.Windows.Controls.ComboBox> receives focus. For more information, see [How to: Set the Target Property of a Label](/previous-versions/dotnet/netframework-3.5/ms752101(v=vs.90)).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ LinearGradientBrush opacity masking example
|
|||||||

|

|
||||||
DrawingBrush opacity masking example
|
DrawingBrush opacity masking example
|
||||||
|
|
||||||
The gradient brushes (<xref:System.Windows.Media.LinearGradientBrush> and <xref:System.Windows.Media.RadialGradientBrush>) are particularly well-suited for use as an opacity mask. Because a <xref:System.Windows.Media.SolidColorBrush> fills an area with a uniform color, they make poor opacity masks; using a <xref:System.Windows.Media.SolidColorBrush> is equivalent to setting the element's or visual's <xref:System.Windows.UIElement.OpacityMask%2A> property.
|
The gradient brushes (<xref:System.Windows.Media.LinearGradientBrush> and <xref:System.Windows.Media.RadialGradientBrush>) are particularly well-suited for use as an opacity mask. Because a <xref:System.Windows.Media.SolidColorBrush> fills an area with a uniform color, they make poor opacity masks; using a <xref:System.Windows.Media.SolidColorBrush> is equivalent to setting the element's or visual's <xref:System.Windows.UIElement.Opacity%2A> property.
|
||||||
|
|
||||||
<a name="creatingopacitymaskswithgradients"></a>
|
<a name="creatingopacitymaskswithgradients"></a>
|
||||||
## Using a Gradient as an Opacity Mask
|
## Using a Gradient as an Opacity Mask
|
||||||
|
|||||||
+1
-1
@@ -65,7 +65,7 @@
|
|||||||
<Rectangle x:Name="PART_GlowRect"
|
<Rectangle x:Name="PART_GlowRect"
|
||||||
Width="100"
|
Width="100"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Fill="{StaticResource ProgressBarIndicatorAnimatedFill}"
|
Fill="{DynamicResource ProgressBarIndicatorAnimatedFill}"
|
||||||
Margin="-100,0,0,0" />
|
Margin="-100,0,0,0" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
+56
-70
@@ -1,87 +1,73 @@
|
|||||||
<Window x:Class="SDKSample.Window1"
|
<Window x:Class="SDKSample.Window1"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="OnLoad"
|
||||||
Loaded="OnLoad"
|
xmlns:ds="clr-namespace:SDKSample">
|
||||||
xmlns:ds="clr-namespace:SDKSample">
|
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<ObjectDataProvider x:Key="EmployeeInfoDataSource"
|
<ObjectDataProvider x:Key="EmployeeInfoDataSource" ObjectType="{x:Type ds:myEmployees}" />
|
||||||
ObjectType="{x:Type ds:myEmployees}"/>
|
</Window.Resources>
|
||||||
</Window.Resources>
|
<Grid>
|
||||||
<Grid>
|
<Grid.RowDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<RowDefinition Height="50"/>
|
||||||
<RowDefinition Height="50"/>
|
<RowDefinition/>
|
||||||
<RowDefinition/>
|
</Grid.RowDefinitions>
|
||||||
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition/>
|
</Grid.ColumnDefinitions>
|
||||||
</Grid.ColumnDefinitions>
|
<TextBlock Grid.Row="0" Grid.Column="0" FontSize="14" HorizontalAlignment="Center">
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" FontSize="14"
|
ListView created with XAML
|
||||||
HorizontalAlignment="Center">
|
</TextBlock>
|
||||||
ListView created with XAML
|
<StackPanel Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center">
|
||||||
</TextBlock>
|
<!--<SnippetListViewEmployee>-->
|
||||||
<StackPanel Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center">
|
|
||||||
<!--<SnippetListViewEmployee>-->
|
|
||||||
|
|
||||||
<!--<SnippetItemsSource>-->
|
<!--<SnippetItemsSource>-->
|
||||||
<ListView ItemsSource="{Binding Source=
|
<ListView ItemsSource="{Binding Source={StaticResource EmployeeInfoDataSource}}">
|
||||||
{StaticResource EmployeeInfoDataSource}}">
|
<!--</SnippetItemsSource>-->
|
||||||
<!--</SnippetItemsSource>-->
|
|
||||||
|
|
||||||
<!--<SnippetListViewView>-->
|
<!--<SnippetListViewView>-->
|
||||||
<ListView.View>
|
<ListView.View>
|
||||||
<!--<SnippetGridViewColumn>-->
|
<!--<SnippetGridViewColumn>-->
|
||||||
|
|
||||||
<!--<SnippetGridViewAllowsColumnReorderPart1>-->
|
<!--<SnippetGridViewAllowsColumnReorderPart1>-->
|
||||||
<GridView AllowsColumnReorder="true"
|
<GridView AllowsColumnReorder="true" ColumnHeaderToolTip="Employee Information">
|
||||||
ColumnHeaderToolTip="Employee Information">
|
<!--</SnippetGridViewAllowsColumnReorderPart1>-->
|
||||||
<!--</SnippetGridViewAllowsColumnReorderPart1>-->
|
|
||||||
|
|
||||||
<!--<SnippetGridViewColumnProperties>-->
|
<!--<SnippetGridViewColumnProperties>-->
|
||||||
<GridViewColumn DisplayMemberBinding=
|
<GridViewColumn DisplayMemberBinding="{Binding Path=FirstName}" Header="First Name" Width="100"/>
|
||||||
"{Binding Path=FirstName}"
|
<!--</SnippetGridViewColumnProperties>-->
|
||||||
Header="First Name" Width="100"/>
|
|
||||||
<!--</SnippetGridViewColumnProperties>-->
|
|
||||||
|
|
||||||
<!--<SnippetHeaderContextMenu>-->
|
<!--<SnippetHeaderContextMenu>-->
|
||||||
<GridViewColumn DisplayMemberBinding=
|
<GridViewColumn DisplayMemberBinding="{Binding Path=LastName}" Width="100">
|
||||||
"{Binding Path=LastName}"
|
|
||||||
Width="100">
|
|
||||||
<GridViewColumnHeader>Last Name
|
<GridViewColumnHeader>Last Name
|
||||||
<GridViewColumnHeader.ContextMenu>
|
<GridViewColumnHeader.ContextMenu>
|
||||||
<ContextMenu MenuItem.Click="LastNameCM_Click"
|
<ContextMenu MenuItem.Click="LastNameCM_Click" Name="LastNameCM">
|
||||||
Name="LastNameCM">
|
<MenuItem Header="Ascending" />
|
||||||
<MenuItem Header="Ascending" />
|
<MenuItem Header="Descending" />
|
||||||
<MenuItem Header="Descending" />
|
</ContextMenu>
|
||||||
</ContextMenu>
|
|
||||||
</GridViewColumnHeader.ContextMenu>
|
</GridViewColumnHeader.ContextMenu>
|
||||||
</GridViewColumnHeader>
|
</GridViewColumnHeader>
|
||||||
</GridViewColumn>
|
</GridViewColumn>
|
||||||
<!--</SnippetHeaderContextMenu>-->
|
<!--</SnippetHeaderContextMenu>-->
|
||||||
|
|
||||||
<GridViewColumn DisplayMemberBinding=
|
<GridViewColumn DisplayMemberBinding="{Binding Path=EmployeeNumber}" Header="Employee No." Width="100"/>
|
||||||
"{Binding Path=EmployeeNumber}"
|
<!--<SnippetGridViewAllowsColumnReorderPart2>-->
|
||||||
Header="Employee No." Width="100"/>
|
</GridView>
|
||||||
<!--<SnippetGridViewAllowsColumnReorderPart2>-->
|
<!--</SnippetGridViewAllowsColumnReorderPart2>-->
|
||||||
</GridView>
|
|
||||||
<!--</SnippetGridViewAllowsColumnReorderPart2>-->
|
|
||||||
|
|
||||||
<!--</SnippetGridViewColumn>-->
|
<!--</SnippetGridViewColumn>-->
|
||||||
</ListView.View>
|
</ListView.View>
|
||||||
<!--</SnippetListViewView>-->
|
<!--</SnippetListViewView>-->
|
||||||
</ListView>
|
</ListView>
|
||||||
<!--</SnippetListViewEmployee>-->
|
<!--</SnippetListViewEmployee>-->
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" FontSize="14"
|
<TextBlock Grid.Row="0" Grid.Column="1" FontSize="14" HorizontalAlignment="Center">
|
||||||
HorizontalAlignment="Center">
|
ListView created with Code
|
||||||
ListView created with Code
|
</TextBlock>
|
||||||
</TextBlock>
|
<StackPanel Grid.Row="1" Grid.Column="1" Name="myStackPanel" HorizontalAlignment="Center">
|
||||||
<StackPanel Grid.Row="1" Grid.Column="1" Name="myStackPanel"
|
</StackPanel>
|
||||||
HorizontalAlignment="Center">
|
</Grid>
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
Reference in New Issue
Block a user