File tree Expand file tree Collapse file tree 5 files changed +52
-2
lines changed
Expand file tree Collapse file tree 5 files changed +52
-2
lines changed Original file line number Diff line number Diff line change 1+ using System . Windows ;
2+ using System . Windows . Controls ;
3+
4+ namespace WPFDevelopers . Controls
5+ {
6+ public class WDUserControl : ContentControl
7+ {
8+ static WDUserControl ( )
9+ {
10+ DefaultStyleKeyProperty . OverrideMetadata ( typeof ( WDUserControl ) ,
11+ new FrameworkPropertyMetadata ( typeof ( WDUserControl ) ) ) ;
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change @@ -69,4 +69,6 @@ TimePicker.xaml
6969Drawer.xaml
7070DateRangePicker.xaml
7171Tag.xaml
72- NavScrollPanel.xamlGestureUnlock.xaml
72+ NavScrollPanel.xaml
73+ GestureUnlock.xaml
74+ WDUserControl.xaml
Original file line number Diff line number Diff line change @@ -70,4 +70,6 @@ TimePicker.xaml
7070Drawer.xaml
7171DateRangePicker.xaml
7272Tag.xaml
73- NavScrollPanel.xamlGestureUnlock.xaml
73+ NavScrollPanel.xaml
74+ GestureUnlock.xaml
75+ WDUserControl.xaml
Original file line number Diff line number Diff line change 1+ <ResourceDictionary
2+ xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
4+ xmlns : controls =" clr-namespace:WPFDevelopers.Controls"
5+ xmlns : helpers =" clr-namespace:WPFDevelopers.Helpers"
6+ xmlns : resx =" clr-namespace:WPFDevelopers" >
7+ <ResourceDictionary .MergedDictionaries>
8+ <ResourceDictionary Source =" Basic/ControlBasic.xaml" />
9+ </ResourceDictionary .MergedDictionaries>
10+ <Style
11+ x : Key =" WD.WDUserControl"
12+ BasedOn =" {StaticResource WD.ControlBasicStyle}"
13+ TargetType =" {x:Type controls:WDUserControl}" >
14+ <Setter Property =" Background" Value =" {DynamicResource WD.BackgroundBrush}" />
15+ <Setter Property =" Template" >
16+ <Setter .Value>
17+ <ControlTemplate TargetType =" {x:Type controls:WDUserControl}" >
18+ <Border Background =" {TemplateBinding Background}" >
19+ <ContentPresenter />
20+ </Border >
21+ </ControlTemplate >
22+ </Setter .Value>
23+ </Setter >
24+ </Style >
25+ <Style BasedOn =" {StaticResource WD.WDUserControl}" TargetType =" {x:Type controls:WDUserControl}" />
26+
27+ </ResourceDictionary >
Original file line number Diff line number Diff line change 1212 <Compile Include =" $(MSBuildThisFileDirectory)Controls\BaseControls\ScaleBase.cs" />
1313 <Compile Include =" $(MSBuildThisFileDirectory)Controls\BaseControls\SliderRepeatButton.cs" />
1414 <Compile Include =" $(MSBuildThisFileDirectory)Controls\BaseControls\WDBorder.cs" />
15+ <Compile Include =" $(MSBuildThisFileDirectory)Controls\BaseControls\WDUserControl.cs" />
1516 <Compile Include =" $(MSBuildThisFileDirectory)Controls\Charts\ChartBase.cs" />
1617 <Compile Include =" $(MSBuildThisFileDirectory)Controls\Charts\ChartLine.cs" />
1718 <Compile Include =" $(MSBuildThisFileDirectory)Controls\Charts\ChartPie.cs" />
559560 <Generator >MSBuild:Compile</Generator >
560561 <SubType >Designer</SubType >
561562 </Page >
563+ <Page Include =" $(MSBuildThisFileDirectory)Themes\WDUserControl.xaml" >
564+ <SubType >Designer</SubType >
565+ <Generator >MSBuild:Compile</Generator >
566+ </Page >
562567 </ItemGroup >
563568 <ItemGroup >
564569 <EmbeddedResource Include =" $(MSBuildThisFileDirectory)Languages\Language.en-US.resx" />
You can’t perform that action at this time.
0 commit comments