UserControl WPF Expression Blend (: , . ). UserControl , . , " " , "" . , , UserControl . : Base, "Hidden" "Visible" ( ).
. GoToStateAction ( UserControl), Loaded. UserControl "" :

<i:Interaction.Triggers>
<i:EventTrigger>
<ei:GoToStateAction TargetObject="{Binding ElementName=userControl}" StateName="Hidden"/>
</i:EventTrigger>
</i:Interaction.Triggers>
-, . , , . " " , , 4 . ( Blend) "" 0 ( GoToStateAction "" , ). "" "", (, 4 ). . , "" " " "" , "" "" .

VisualState Custom Control
( UserControl) VisualStateManager , ( VisualState Loaded), , . , ( ) OnApplyTemplate(), Loaded. , VisualState Loaded , . OnApplyTemplate():
public class MyCustomControl : ContentControl
{
public MyCustomControl()
{
if (DesignerProperties.GetIsInDesignMode(this))
return;
Loaded += new RoutedEventHandlerMyCustomControl_Loaded);
}
private void MyCustomControl_Loaded(object sender, RoutedEventArgs e)
{
}
public override void OnApplyTemplate()
{
if (DesignerProperties.GetIsInDesignMode(this))
return;
base.OnApplyTemplate();
VisualStateManager.GoToState(this, "MyInitialState", false);
}
}