c# - Cannot find and add SurfaceUserControl -
c# - Cannot find and add SurfaceUserControl -
i can create usercontrol , add together textbox in surface environment. here sample code:
<usercontrol x:class="scatterviewsizingsample.fixedsizechild" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:scatterviewsizingsample" mc:ignorable="d" local:popupwindow.initialsizerequest="300,250" d:designheight="300" d:designwidth="250"> <grid background="mediumseagreen"> <textbox horizontalalignment="left" name="textbox1" verticalalignment="top"/> </grid> </usercontrol>
i tried add together surfaceusercontrol , surfacetextbox, cannot find add together surfaceusercontrol menu. changed usercontrol s:surfaceusercontrol , texbox s:surfacetextbox follows:
<s:surfaceusercontrol x:class="scatterviewsizingsample.fixedsizechild" 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:scatterviewsizingsample" mc:ignorable="d" local:popupwindow.initialsizerequest="300,250" d:designheight="300" d:designwidth="250"> <grid background="mediumseagreen"> <s:surfacetextbox horizontalalignment="left" name="textbox1"/> </grid> </s:surfaceusercontrol>
but scheme shows error 'the type s:surfacewindows not found'. added microsoft.surface.presentation , microsoft.surface.presentation.generic assembly reference. still shows error.
how can prepare it? why scheme not show surfaceusercontrol usercontrol?
an application using surface controls needs utilize surfacewindow it's root visual in order of custom touch handling. suspect since you're trying convert still using standard window giving error.
c# .net wpf pixelsense
Comments
Post a Comment