I use caliburn.micro
in WPF.
Although i set x:Name
to my element(which is in xaml), i do not see elements (button, textbox, grid etc) in my code behind(In my ViewModel).
As if x:Name is private
For Example:
<Button x:Name="mybutton">
<StckPanel Orientation="Horizontal">
<Image Width="30" Source="/Resources/edit.png" />
<TextBlock Margin="5" FontSize="15" Text="Update">
</TextBlock>
</StackPanel>
</Button>
x:Name
creates a private member by default, and you shouldn't change that. Your view model should by definition not access view elements. – Clemens