You can change the background color of the container control
With a Grid :
Windows.UI.Xaml.Controls.Grid grid = null;
private void WindowsXamlHost_ChildChanged(object sender, EventArgs e)
{
WindowsXamlHost windowsXamlHost = (WindowsXamlHost)sender;
grid = (Windows.UI.Xaml.Controls.Grid)windowsXamlHost.Child;
if (grid != null)
{
var brush1 = new Windows.UI.Xaml.Media.SolidColorBrush(Windows.UI.Colors.BlueViolet);
grid.Background = brush1;
Windows.UI.Xaml.Controls.InkCanvas MyControl2 = new Windows.UI.Xaml.Controls.InkCanvas();
MyControl2.Name = "InkCanvas1";
MyControl2.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Mouse |
Windows.UI.Core.CoreInputDeviceTypes.Pen | Windows.UI.Core.CoreInputDeviceTypes.Touch;
grid.Children.Add(MyControl2);
}
}
in XAML :
<XamlHost:WindowsXamlHost HorizontalAlignment="Left" Height="183" Margin="46,64,0,0" VerticalAlignment="Top" Width="426" InitialTypeName="Windows.UI.Xaml.Controls.Grid" ChildChanged="WindowsXamlHost_ChildChanged" Grid.ColumnSpan="2"/>