File tree 2 files changed +12
-4
lines changed
Migration and Interoperability/WpfHostingWindowsFormsControl/WPFApp
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,21 @@ public partial class MainWindow : Window
21
21
private FontStyle _initFontStyle ;
22
22
private FontWeight _initFontWeight ;
23
23
private SolidColorBrush _initForeBrush ;
24
- private NavigationWindow _myWindow ;
24
+ private MainWindow _myWindow ;
25
25
private bool _uiIsReady ;
26
26
27
+ public MainWindow ( ) {
28
+ Loaded += MainWindow_Loaded ;
29
+ }
30
+
31
+ private void MainWindow_Loaded ( object sender , RoutedEventArgs e ) {
32
+ Init ( sender , e ) ;
33
+ }
34
+
27
35
private void Init ( object sender , EventArgs e )
28
36
{
29
37
_app = Application . Current ;
30
- _myWindow = ( NavigationWindow ) _app . MainWindow ;
38
+ _myWindow = ( MainWindow ) _app . MainWindow ;
31
39
_myWindow . SizeToContent = SizeToContent . WidthAndHeight ;
32
40
wfh . TabIndex = 10 ;
33
41
_initFontSize = wfh . FontSize ;
Original file line number Diff line number Diff line change 6
6
xmlns : local =" clr-namespace:WPFApp"
7
7
xmlns : mcl =" clr-namespace:MyControls;assembly=FormsControlLibrary"
8
8
mc : Ignorable =" d"
9
- Title =" MainWindow" Height =" 350 " Width =" 525 " >
9
+ Title =" MainWindow" Height =" 560 " Width =" 560 " >
10
10
<DockPanel >
11
11
<DockPanel .Resources>
12
12
<Style x : Key =" InlineText" TargetType =" {x:Type Inline}" >
22
22
<StackPanel Orientation =" Vertical"
23
23
DockPanel.Dock=" Left"
24
24
Background =" Bisque"
25
- Width =" 250 " >
25
+ Width =" 170 " >
26
26
27
27
<TextBlock Margin =" 10,10,10,10"
28
28
FontWeight =" Bold"
You can’t perform that action at this time.
0 commit comments