いくつかのコントロール (ボタンとチェックボックス) を含む UserControl を作成しました。
その後、WPF Windows でその UserControl への参照を追加しました。
私がやりたいことは: UserControl のボタンをクリックすると、このボタンがアクションを起動し、Windows で何かを変更します (Textbox1.Text = "something")。
私の問題は、UserControl から Windows 内のコントロールにアクセスできないことです。
何か助けてください?
EDIT
: コードサンプルを追加
<s:SurfaceWindow x:Class="Project.Temp.MainSurface"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="http://schemas.microsoft.com/surface/2008"
xmlns:local="clr-namespace:Project"
Title="Project.Temp"
>
<Grid x:Name="Root" ... >
<Grid x:Name="Child" ... >
<local:MyUserControl x:Name="UserControlStart" ... />
</Grid>
...
</Grid>