@@ -37,7 +37,6 @@ public BladeItem()
3737 protected override void OnApplyTemplate ( )
3838 {
3939 _loaded = true ;
40- base . OnApplyTemplate ( ) ;
4140
4241 _closeButton = GetTemplateChild ( "CloseButton" ) as Button ;
4342 _enlargeButton = GetTemplateChild ( "EnlargeButton" ) as Button ;
@@ -66,10 +65,9 @@ private void OnExpanding(Expander sender, ExpanderExpandingEventArgs args)
6665 {
6766 Width = _normalModeWidth ;
6867 VisualStateManager . GoToState ( this , "Expanded" , true ) ;
69- var name = "WCT_BladeView_ExpandButton_Collapsed" . GetLocalized ( "CommunityToolkit.WinUI.UI.Controls.Layout/Resources" ) ;
7068 if ( _enlargeButton != null )
7169 {
72- AutomationProperties . SetName ( _enlargeButton , name ) ;
70+ AutomationProperties . SetName ( _enlargeButton , "Expand Blade Item" ) ;
7371 }
7472 }
7573 }
@@ -80,11 +78,9 @@ private void OnCollapsed(Expander sender, ExpanderCollapsedEventArgs args)
8078 if ( _loaded )
8179 {
8280 Width = double . NaN ;
83- VisualStateManager . GoToState ( this , "Collapsed" , true ) ;
84- var name = "WCT_BladeView_ExpandButton_Expanded" . GetLocalized ( "CommunityToolkit.WinUI.UI.Controls.Layout/Resources" ) ;
8581 if ( _enlargeButton != null )
8682 {
87- AutomationProperties . SetName ( _enlargeButton , name ) ;
83+ AutomationProperties . SetName ( _enlargeButton , "Collapse Blade Item" ) ;
8884 }
8985 }
9086 }
0 commit comments