UWP ScrollBar在我的usercontrol中不可见

时间:2018-06-11 13:36:32

标签: xaml uwp scintilla

<UserControl
x:Class="scintillauwp.ScintillaControlEx"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:scintillauwp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:canvas="using:Microsoft.Graphics.Canvas.UI.Xaml"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400" SizeChanged="UserControl_SizeChanged" MinWidth="100" MinHeight="100">
<Grid x:Name="rootLayout">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="Auto"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="*" />
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <canvas:CanvasControl x:Name="canvas"  Grid.RowSpan="2"  Grid.ColumnSpan="2"
                                PointerWheelChanged="canvas_PointerWheelChanged" PointerMoved="canvas_PointerMoved" PointerPressed="canvas_PointerPressed" PointerReleased="canvas_PointerReleased" MinWidth="100" MinHeight="100" PointerEntered="canvas_PointerEntered" KeyUp="canvas_KeyUp" KeyDown="canvas_KeyDown" GotFocus="canvas_GotFocus" LostFocus="canvas_LostFocus" PointerExited="canvas_PointerExited" Draw="canvas_Draw_1"  >
    </canvas:CanvasControl>
    <ScrollBar x:Name="VerticalScrollBar" Grid.Column="1"
             IsTabStop="False"
             Orientation="Vertical"
             HorizontalAlignment="Right" Maximum="10000"  Value="1000" ViewportSize="800" />
    <ScrollBar x:Name="HorizontalScrollBar"  IsTabStop="False"
             Orientation="Horizontal"
             Grid.Row="1" />
    <Border  x:Name="ScrollBarSeparator" Grid.Row="1" Grid.Column="1" Background="{ThemeResource SystemControlPageBackgroundChromeLowBrush}"/>
</Grid>

//Maximum="10000" Value="1000" ViewportSize="800"------是测试

大家好,我的英语不行。我正在使用谷歌翻译。

我将闪烁移植到UWP。 ScrollBar未在上面的代码中显示。我尝试使用ScrollViewer + CanvasVirtualControl,但它需要在EditView中修改闪烁的代码。 谢谢。 There are Thumb in the layout of the following figure

0 个答案:

没有答案