Skip to content

Commit 1483f54

Browse files
authored
Merge pull request lepoco#659 from IvanDmitriev1/fixes
Textbox control update, small other changes.
2 parents 109e37c + f028eac commit 1483f54

File tree

6 files changed

+40
-257
lines changed

6 files changed

+40
-257
lines changed

src/Wpf.Ui.Gallery/Views/Pages/Layout/ExpanderPage.xaml

+32-33
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,40 @@
2121
<system:String x:Key="PageCsharpUrl">https://github.com/lepoco/wpfui/blob/development/src/Wpf.Ui/Controls/Expander.cs</system:String>
2222
</Page.Resources>
2323
<Grid>
24-
<ui:DynamicScrollViewer
25-
x:Name="PageScrollViewer"
26-
HorizontalAlignment="Stretch"
27-
VerticalAlignment="Stretch">
28-
<Grid>
29-
<Grid.ColumnDefinitions>
30-
<ColumnDefinition Width="*" />
31-
<ColumnDefinition Width="280" />
32-
</Grid.ColumnDefinitions>
33-
<Grid Grid.Column="0" Margin="42">
34-
<Grid.RowDefinitions>
35-
<RowDefinition Height="Auto" />
36-
</Grid.RowDefinitions>
24+
<Grid.ColumnDefinitions>
25+
<ColumnDefinition Width="*" />
26+
<ColumnDefinition Width="280" />
27+
</Grid.ColumnDefinitions>
3728

38-
<controls:GalleryControlPresenter
39-
Grid.Row="0"
40-
Margin="0"
41-
CodeText="&lt;Expander Header=&quot;This text is in the header&quot; Content=&quot;This is in the content&quot; /&gt;"
42-
HeaderText="An Expander with text in the header and content areas">
43-
<Grid>
44-
<Grid.ColumnDefinitions>
45-
<ColumnDefinition Width="*" />
46-
<ColumnDefinition Width="Auto" />
47-
</Grid.ColumnDefinitions>
48-
<Expander
49-
Grid.Column="0"
50-
Content="This is in the content"
51-
Header="This text is in the header" />
29+
<Grid Grid.Column="0">
30+
<Grid.RowDefinitions>
31+
<RowDefinition Height="Auto" />
32+
</Grid.RowDefinitions>
5233

53-
<!-- TODO: ExpandDirection -->
54-
</Grid>
55-
</controls:GalleryControlPresenter>
34+
<controls:GalleryControlPresenter
35+
Grid.Row="0"
36+
Margin="0"
37+
CodeText="&lt;Expander Header=&quot;This text is in the header&quot; Content=&quot;This is in the content&quot; /&gt;"
38+
HeaderText="An Expander with text in the header and content areas">
39+
<Grid>
40+
<Grid.ColumnDefinitions>
41+
<ColumnDefinition Width="*" />
42+
<ColumnDefinition Width="Auto" />
43+
</Grid.ColumnDefinitions>
44+
<Expander
45+
Grid.Column="0"
46+
Content="This is in the content"
47+
Header="This text is in the header" />
48+
49+
<!-- TODO: ExpandDirection -->
5650
</Grid>
57-
</Grid>
58-
</ui:DynamicScrollViewer>
59-
<controls:ControlDocumentationSummary CsharpUrl="{StaticResource PageCsharpUrl}" XamlUrl="{StaticResource PageXamlUrl}" />
51+
</controls:GalleryControlPresenter>
52+
</Grid>
53+
54+
<controls:ControlDocumentationSummary
55+
Grid.Column="1"
56+
Margin="42,0,0,0"
57+
CsharpUrl="{StaticResource PageCsharpUrl}"
58+
XamlUrl="{StaticResource PageXamlUrl}" />
6059
</Grid>
6160
</Page>

src/Wpf.Ui.Gallery/Views/Pages/Samples/MultilevelNavigationSamplePage3.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
HorizontalAlignment="Center"
3434
Command="{Binding NavigateForwardCommand}"
3535
CommandParameter="{x:Type local:MultilevelNavigationSamplePage1}"
36-
Content="Navigate to the third page"
36+
Content="Navigate to the first page"
3737
FontSize="24" />
3838
</Grid>
3939
</Page>

src/Wpf.Ui/Controls/TextBox.cs

+1-32
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,6 @@ public class TextBox : System.Windows.Controls.TextBox
3535
typeof(ElementPlacement), typeof(TextBox),
3636
new PropertyMetadata(ElementPlacement.Left));
3737

38-
/// <summary>
39-
/// Property for <see cref="TextBoxClearButtonIconSize"/>.
40-
/// </summary>
41-
public static readonly DependencyProperty TextBoxClearButtonIconSizeProperty = DependencyProperty.Register(
42-
nameof(TextBoxClearButtonIconSize),
43-
typeof(int), typeof(TextBox),
44-
new FrameworkPropertyMetadata());
45-
46-
/// <summary>
47-
/// Property for <see cref="TextBoxClearButtonHeight"/>.
48-
/// </summary>
49-
public static readonly DependencyProperty TextBoxClearButtonHeightProperty = DependencyProperty.Register(
50-
nameof(TextBoxClearButtonHeight),
51-
typeof(int), typeof(TextBox),
52-
new FrameworkPropertyMetadata());
53-
5438
/// <summary>
5539
/// Property for <see cref="PlaceholderText"/>.
5640
/// </summary>
@@ -137,22 +121,7 @@ public bool ClearButtonEnabled
137121
get => (bool)GetValue(ClearButtonEnabledProperty);
138122
set => SetValue(ClearButtonEnabledProperty, value);
139123
}
140-
/// <summary>
141-
/// Defines size of TextBoxClearButton should be.
142-
/// </summary>
143-
public int TextBoxClearButtonIconSize
144-
{
145-
get => (int)GetValue(TextBoxClearButtonIconSizeProperty);
146-
set => SetValue(TextBoxClearButtonIconSizeProperty, value);
147-
}
148-
/// <summary>
149-
/// Defines height of TextBoxClearButton should be.
150-
/// </summary>
151-
public int TextBoxClearButtonHeight
152-
{
153-
get => (int)GetValue(TextBoxClearButtonHeightProperty);
154-
set => SetValue(TextBoxClearButtonHeightProperty, value);
155-
}
124+
156125
/// <summary>
157126
/// Gets or sets a value determining whether to show the clear button when <see cref="TextBox"/> is focused.
158127
/// </summary>

src/Wpf.Ui/Styles/Controls/Button.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
VerticalAlignment="Center"
206206
Content="{TemplateBinding Icon}"
207207
Focusable="False"
208-
TextElement.FontSize="{Binding Path=FontSize,RelativeSource={RelativeSource TemplatedParent}}"
208+
TextElement.FontSize="{TemplateBinding FontSize}"
209209
TextElement.Foreground="{TemplateBinding Foreground}" />
210210

211211
<ContentPresenter

src/Wpf.Ui/Styles/Controls/FluentWindow.xaml

-8
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@
5252
</ControlTemplate>
5353
</Setter.Value>
5454
</Setter>
55-
<Style.Triggers>
56-
<Trigger Property="WindowState" Value="Normal">
57-
<Setter Property="ResizeMode" Value="CanResize" />
58-
</Trigger>
59-
<Trigger Property="WindowState" Value="Maximized">
60-
<Setter Property="ResizeMode" Value="NoResize" />
61-
</Trigger>
62-
</Style.Triggers>
6355
</Style>
6456

6557
<Style BasedOn="{StaticResource DefaultFluentWindowStyle}" TargetType="{x:Type windowControls:FluentWindow}" />

0 commit comments

Comments
 (0)