diff --git a/CPF.Linux/CPF.Linux.csproj b/CPF.Linux/CPF.Linux.csproj index 74057b6..f57f6c2 100644 --- a/CPF.Linux/CPF.Linux.csproj +++ b/CPF.Linux/CPF.Linux.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 0.9.6.5 false QQ:761716178 diff --git a/CPF.Skia/CPF.Skia.csproj b/CPF.Skia/CPF.Skia.csproj index 086daf4..979ba49 100644 --- a/CPF.Skia/CPF.Skia.csproj +++ b/CPF.Skia/CPF.Skia.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 QQ:761716178 跨平台UI框架 0.9.6.6 Xhm.CPF.Skia diff --git a/CPF.Windows/CPF.Windows.csproj b/CPF.Windows/CPF.Windows.csproj index ce67100..7e05a16 100644 --- a/CPF.Windows/CPF.Windows.csproj +++ b/CPF.Windows/CPF.Windows.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 QQ:761716178 跨平台UI框架 0.9.6.6 Xhm.CPF.Windows diff --git a/CPF/CPF.csproj b/CPF/CPF.csproj index cea8772..71c1271 100644 --- a/CPF/CPF.csproj +++ b/CPF/CPF.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 QQ:761716178 QQ:761716178 QQ:761716178 跨平台UI框架 diff --git a/CPF/Charts/Chart.cs b/CPF/Charts/Chart.cs index a695c79..d4f0336 100644 --- a/CPF/Charts/Chart.cs +++ b/CPF/Charts/Chart.cs @@ -64,9 +64,9 @@ namespace CPF.Charts Panel tipPanel; TextBlock tipName; Panel tipListPanel; - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); seriesPanel = FindPresenterByName("seriesPanel"); tipPanel = FindPresenterByName("tipPanel"); tipName = FindPresenterByName("tipName"); diff --git a/CPF/Charts/PieChart.cs b/CPF/Charts/PieChart.cs index 378c398..8202181 100644 --- a/CPF/Charts/PieChart.cs +++ b/CPF/Charts/PieChart.cs @@ -269,9 +269,9 @@ namespace CPF.Charts Panel tipPanel; TextBlock tipName; Panel tipListPanel; - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); seriesPanel = FindPresenterByName("seriesPanel"); tipPanel = FindPresenterByName("tipPanel"); tipName = FindPresenterByName("tipName"); diff --git a/CPF/Controls/Calendar.cs b/CPF/Controls/Calendar.cs index 6de278f..31ad4ca 100644 --- a/CPF/Controls/Calendar.cs +++ b/CPF/Controls/Calendar.cs @@ -74,9 +74,9 @@ namespace CPF.Controls Grid Month; Grid Year; - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); Month = FindPresenterByName("MonthView"); Year = FindPresenterByName("YearView"); var date = DisplayDate.Date; diff --git a/CPF/Controls/CodeTextBox/CodeTextBox.cs b/CPF/Controls/CodeTextBox/CodeTextBox.cs index 9aa4271..85585a9 100644 --- a/CPF/Controls/CodeTextBox/CodeTextBox.cs +++ b/CPF/Controls/CodeTextBox/CodeTextBox.cs @@ -357,9 +357,9 @@ namespace CPF.Controls ScrollViewer scrollViewer; LineNumber lineNumber; - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); scrollViewer = FindPresenterByName("scrollViewer"); lineNumber = FindPresenterByName("lineNumber"); var contentPresenter = scrollViewer.FindPresenterByName("contentPresenter"); diff --git a/CPF/Controls/ComboBox.cs b/CPF/Controls/ComboBox.cs index 491f567..ac412ce 100644 --- a/CPF/Controls/ComboBox.cs +++ b/CPF/Controls/ComboBox.cs @@ -362,9 +362,9 @@ namespace CPF.Controls // return panel; //} //Panel panel; - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); //panel = GetItemsPanel(); //if (panel == null) //{ diff --git a/CPF/Controls/ContentControl.cs b/CPF/Controls/ContentControl.cs index e425af8..1ac1dd5 100644 --- a/CPF/Controls/ContentControl.cs +++ b/CPF/Controls/ContentControl.cs @@ -163,7 +163,7 @@ namespace CPF.Controls }); } UIElement contentPresenter; - protected override void OnInitialized() + protected override void OnInitializedAsync() { contentPresenter = FindPresenterByName("contentPresenter"); if (contentPresenter == null) @@ -192,7 +192,7 @@ namespace CPF.Controls } } } - base.OnInitialized(); + base.OnInitializedAsync(); } protected override void OnOverrideMetadata(OverrideMetadata overridePropertys) diff --git a/CPF/Controls/Control.cs b/CPF/Controls/Control.cs index 6fed919..74e5fc6 100644 --- a/CPF/Controls/Control.cs +++ b/CPF/Controls/Control.cs @@ -281,12 +281,12 @@ namespace CPF.Controls Template(this, this.Children); } IsInitialized = true; - OnInitialized(); + OnInitializedAsync(); } LoadStyle(); } - protected virtual void OnInitialized() + protected virtual void OnInitializedAsync() { if (triggers != null) { diff --git a/CPF/Controls/DataGrid/DataGrid.cs b/CPF/Controls/DataGrid/DataGrid.cs index 9b7ea82..81b0203 100644 --- a/CPF/Controls/DataGrid/DataGrid.cs +++ b/CPF/Controls/DataGrid/DataGrid.cs @@ -202,7 +202,7 @@ namespace CPF.Controls } internal DataGridScrollViewer viewer; VirtualizationPresenter presenter; - protected override void OnInitialized() + protected override void OnInitializedAsync() { viewer = FindPresenter().FirstOrDefault(a => a.Name == "DG_ScrollViewer"); if (!viewer) @@ -254,7 +254,7 @@ namespace CPF.Controls } columns.CollectionChanged += Columns_CollectionChanged; viewer.contentPresenter.LayoutUpdated += ContentPresenter_LayoutUpdated; - base.OnInitialized(); + base.OnInitializedAsync(); var panel = ItemsHost as StackPanel; if (!panel || panel.Orientation == Orientation.Horizontal) { diff --git a/CPF/Controls/DataGrid/DataGridCell.cs b/CPF/Controls/DataGrid/DataGridCell.cs index f12784e..d77883c 100644 --- a/CPF/Controls/DataGrid/DataGridCell.cs +++ b/CPF/Controls/DataGrid/DataGridCell.cs @@ -85,9 +85,9 @@ namespace CPF.Controls Triggers.Add(nameof(IsSelected), Relation.Me, null, (nameof(Background), "75,178,255")); } DataGridCellTemplate cellTemplate; - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); cellTemplate = FindPresenter().FirstOrDefault(a => a.Name == "CellTemplate"); } diff --git a/CPF/Controls/DataGrid/DataGridRow.cs b/CPF/Controls/DataGrid/DataGridRow.cs index f28ab37..2976f07 100644 --- a/CPF/Controls/DataGrid/DataGridRow.cs +++ b/CPF/Controls/DataGrid/DataGridRow.cs @@ -59,7 +59,7 @@ namespace CPF.Controls Triggers.Add(new Styling.Trigger { Property = nameof(IsSelected), Setters = { { nameof(Background), "#ddd" } } }); } internal Panel itemsPanel; - protected override void OnInitialized() + protected override void OnInitializedAsync() { itemsPanel = FindPresenter().FirstOrDefault(a => a.Name == "itemsPanel"); if (!itemsPanel) @@ -74,7 +74,7 @@ namespace CPF.Controls } } - base.OnInitialized(); + base.OnInitializedAsync(); } [PropertyChanged(nameof(IsSelected))] diff --git a/CPF/Controls/DataGrid/DataGridScrollViewer.cs b/CPF/Controls/DataGrid/DataGridScrollViewer.cs index ef0b5f9..2851945 100644 --- a/CPF/Controls/DataGrid/DataGridScrollViewer.cs +++ b/CPF/Controls/DataGrid/DataGridScrollViewer.cs @@ -47,14 +47,14 @@ namespace CPF.Controls internal Panel PART_ColumnHeadersPresenter; internal UIElement contentPresenter; - protected override void OnInitialized() + protected override void OnInitializedAsync() { PART_ColumnHeadersPresenter = FindPresenter().FirstOrDefault(a => a.Name == "PART_ColumnHeadersPresenter"); if (!PART_ColumnHeadersPresenter) { throw new Exception("需要Name为PART_ColumnHeadersPresenter的元素"); } - base.OnInitialized(); + base.OnInitializedAsync(); contentPresenter = FindPresenter().FirstOrDefault(a => a.Name == "contentPresenter"); } diff --git a/CPF/Controls/ItemsControl.cs b/CPF/Controls/ItemsControl.cs index 4ca5118..5443eb2 100644 --- a/CPF/Controls/ItemsControl.cs +++ b/CPF/Controls/ItemsControl.cs @@ -271,9 +271,9 @@ namespace CPF.Controls return FindPresenter().FirstOrDefault(a => a.Name == "itemsPanel"); } - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); panel = GetItemsPanel(); //if (panel == null) //{ diff --git a/CPF/Controls/ListBox.cs b/CPF/Controls/ListBox.cs index b039c99..89c3698 100644 --- a/CPF/Controls/ListBox.cs +++ b/CPF/Controls/ListBox.cs @@ -179,9 +179,9 @@ namespace CPF.Controls VirtualizationPresenter presenter; //Panel InnerPanel; - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); if (isVirtualizing) { presenter = FindPresenter>().FirstOrDefault(); diff --git a/CPF/Controls/MenuItem.cs b/CPF/Controls/MenuItem.cs index f665e9c..93dc4c1 100644 --- a/CPF/Controls/MenuItem.cs +++ b/CPF/Controls/MenuItem.cs @@ -322,9 +322,9 @@ namespace CPF.Controls this.Triggers.Add(new Styling.Trigger { Property = nameof(IsMouseOver), Setters = { { nameof(Background), "#fff" } } }); } - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); } diff --git a/CPF/Controls/MultiSelector.cs b/CPF/Controls/MultiSelector.cs index 6000c83..75e3ea8 100644 --- a/CPF/Controls/MultiSelector.cs +++ b/CPF/Controls/MultiSelector.cs @@ -331,10 +331,10 @@ namespace CPF.Controls } bool isFirst; - protected override void OnInitialized() + protected override void OnInitializedAsync() { isFirst = true; - base.OnInitialized(); + base.OnInitializedAsync(); isFirst = false; if (selectIndex.HasValue) { diff --git a/CPF/Controls/NumericUpDown.cs b/CPF/Controls/NumericUpDown.cs index af5149d..d80bb33 100644 --- a/CPF/Controls/NumericUpDown.cs +++ b/CPF/Controls/NumericUpDown.cs @@ -107,9 +107,9 @@ namespace CPF.Controls }); } - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); numTextBox = FindPresenterByName("numTextBox"); } TextBox numTextBox; diff --git a/CPF/Controls/PageManger.cs b/CPF/Controls/PageManger.cs index f719662..f60a9db 100644 --- a/CPF/Controls/PageManger.cs +++ b/CPF/Controls/PageManger.cs @@ -138,9 +138,9 @@ namespace CPF.Controls } #if !DesignMode //用户代码写到这里,设计器下不执行,防止设计器出错 - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); } //用户代码 diff --git a/CPF/Controls/ProgressBar.cs b/CPF/Controls/ProgressBar.cs index 6ee16c9..6daf5f1 100644 --- a/CPF/Controls/ProgressBar.cs +++ b/CPF/Controls/ProgressBar.cs @@ -97,9 +97,9 @@ namespace CPF.Controls }); } - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); _indicator = FindPresenter().FirstOrDefault(a => a.Name == "Indicator"); _Animation = FindPresenter().FirstOrDefault(a => a.Name == "Animation"); } diff --git a/CPF/Controls/Slider.cs b/CPF/Controls/Slider.cs index 450cae0..f5ebd74 100644 --- a/CPF/Controls/Slider.cs +++ b/CPF/Controls/Slider.cs @@ -197,9 +197,9 @@ namespace CPF.Controls }); } - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); this.Track = FindPresenter().FirstOrDefault(a => a.Name == "PART_Track"); } diff --git a/CPF/Controls/TabControl.cs b/CPF/Controls/TabControl.cs index 20163f2..403c6e2 100644 --- a/CPF/Controls/TabControl.cs +++ b/CPF/Controls/TabControl.cs @@ -363,7 +363,7 @@ namespace CPF.Controls Panel headerPanel; Panel contentPanel; - protected override void OnInitialized() + protected override void OnInitializedAsync() { headerPanel = FindPresenter().FirstOrDefault(a => a.Name == "headerPanel"); if (!headerPanel) @@ -410,7 +410,7 @@ namespace CPF.Controls } //} } - base.OnInitialized(); + base.OnInitializedAsync(); } [PropertyChanged(nameof(SelectedIndex))] void RegisterSelectedIndex(object newValue, object oldValue, PropertyMetadataAttribute attribute) diff --git a/CPF/Controls/TextBox.cs b/CPF/Controls/TextBox.cs index 82f1bb3..5a2d768 100644 --- a/CPF/Controls/TextBox.cs +++ b/CPF/Controls/TextBox.cs @@ -420,9 +420,9 @@ namespace CPF.Controls } ScrollViewer scrollViewer; - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); if (view == null) { view = TextBoxView; diff --git a/CPF/Controls/View.cs b/CPF/Controls/View.cs index 511a699..9abaece 100644 --- a/CPF/Controls/View.cs +++ b/CPF/Controls/View.cs @@ -1795,9 +1795,9 @@ namespace CPF.Controls //} internal List<(Delegate, UIElement)> afterStyles; - protected override void OnInitialized() + protected override void OnInitializedAsync() { - base.OnInitialized(); + base.OnInitializedAsync(); if (afterStyles != null) { foreach (var item in afterStyles)