diff --git a/FileManager_UWP/App.xaml.cs b/FileManager_UWP/App.xaml.cs index 9f0d361..cd90533 100644 --- a/FileManager_UWP/App.xaml.cs +++ b/FileManager_UWP/App.xaml.cs @@ -1,4 +1,5 @@ using FileManager_UWP.Service; +using FileManager_UWP.View; using GalaSoft.MvvmLight.Ioc; using System; using System.Collections.Generic; @@ -68,7 +69,7 @@ namespace FileManager_UWP // 当导航堆栈尚未还原时,导航到第一页, // 并通过将所需信息作为导航参数传入来配置 // 参数 - rootFrame.Navigate(typeof(MainPage), e.Arguments); + rootFrame.Navigate(typeof(TestLabelView), e.Arguments); } // 确保当前窗口处于活动状态 Window.Current.Activate(); diff --git a/FileManager_UWP/Controls/LabelListControl.cs b/FileManager_UWP/Controls/LabelListControl.cs new file mode 100644 index 0000000..8927ab6 --- /dev/null +++ b/FileManager_UWP/Controls/LabelListControl.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Documents; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; + +// The Templated Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234235 + +namespace FileManager_UWP.Controls { + public sealed class LabelListControl: Control { + public LabelListControl() { + this.DefaultStyleKey = typeof(LabelListControl); + } + + protected override void OnApplyTemplate() { + ((TextBlock)GetTemplateChild("LabelTextBlock")).Text = "测试自定义控件"; + } + } +} diff --git a/FileManager_UWP/Controls/LabelListControl.xaml b/FileManager_UWP/Controls/LabelListControl.xaml new file mode 100644 index 0000000..8708748 --- /dev/null +++ b/FileManager_UWP/Controls/LabelListControl.xaml @@ -0,0 +1,18 @@ + + + + + diff --git a/FileManager_UWP/FileManager_UWP.csproj b/FileManager_UWP/FileManager_UWP.csproj index ba78b14..d78a174 100644 --- a/FileManager_UWP/FileManager_UWP.csproj +++ b/FileManager_UWP/FileManager_UWP.csproj @@ -120,6 +120,7 @@ App.xaml + @@ -141,6 +142,9 @@ PreviewView.xaml + + TestLabelView.xaml + @@ -163,6 +167,14 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + Designer MSBuild:Compile @@ -175,6 +187,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + @@ -202,9 +218,7 @@ 4.3.0 - - - + 14.0 diff --git a/FileManager_UWP/Properties/AssemblyInfo.cs b/FileManager_UWP/Properties/AssemblyInfo.cs index 1b12465..c3c28d8 100644 --- a/FileManager_UWP/Properties/AssemblyInfo.cs +++ b/FileManager_UWP/Properties/AssemblyInfo.cs @@ -1,4 +1,5 @@ -using System.Reflection; +using System.Resources; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -26,4 +27,6 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file +[assembly: ComVisible(false)] +[assembly: NeutralResourcesLanguage("zh")] + diff --git a/FileManager_UWP/Themes/Generic.xaml b/FileManager_UWP/Themes/Generic.xaml new file mode 100644 index 0000000..59de266 --- /dev/null +++ b/FileManager_UWP/Themes/Generic.xaml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/FileManager_UWP/View/FileListView.xaml b/FileManager_UWP/View/FileListView.xaml index 8d2d0bf..aea045a 100644 --- a/FileManager_UWP/View/FileListView.xaml +++ b/FileManager_UWP/View/FileListView.xaml @@ -65,12 +65,21 @@ Style="{ThemeResource BaseTextBlockStyle}" Foreground="{ThemeResource SystemControlPageTextBaseHighBrush}" Margin="12,0,0,0"/> - - - - + + + + + + + + + - diff --git a/FileManager_UWP/View/TestLabelView.xaml b/FileManager_UWP/View/TestLabelView.xaml new file mode 100644 index 0000000..27f4880 --- /dev/null +++ b/FileManager_UWP/View/TestLabelView.xaml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/FileManager_UWP/View/TestLabelView.xaml.cs b/FileManager_UWP/View/TestLabelView.xaml.cs new file mode 100644 index 0000000..2900d54 --- /dev/null +++ b/FileManager_UWP/View/TestLabelView.xaml.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 + +namespace FileManager_UWP.View { + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class TestLabelView: Page { + public TestLabelView() { + this.InitializeComponent(); + } + } +}