[RS3:1709] [UWP] ContentDialog在定位构建16299时设置maxwidth [英] [RS3:1709][UWP]ContentDialog setting maxwidth when targeting build 16299

查看:51
本文介绍了[RS3:1709] [UWP] ContentDialog在定位构建16299时设置maxwidth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

定位构建15063我可以使用它来更改contentdialog的最大宽度


  &NBSP; &NBSP; &NBSP; < Style x:Key =" MyDialog" TargetType =" ContentDialog">

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < Setter Property =" MaxWidth"值=" 1200">< / Setter>

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; < Setter Property =" MaxHeight"值=" 1000">< / Setter>

  &NBSP; &NBSP; &NBSP; < /样式和GT;


但是当定位构建16299时,这不起作用。


我如何让它工作?

解决方案

Hi ConceptData


我可以重现你的问题。我已经报告了这一点。


如果你需要一个大警报,你可以尝试使用

popup
。 创建一个自定义的usercontrol并在弹出窗口中添加usercontrol。


您可以参考以下代码:


< Popup x:Name =" ParentedPopup" Horizo​​ntalOffset = QUOT; 200" VerticalOffset = QUOT; 200"> 
< local:PopupInputContent MaxWidth =" 1200" MaxHeight = QUOT; 1000" />
< / Popup>





< UserControl 
x:Class =" App1.PopupInputContent"
xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x =" http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local =" using:App1"
xmlns:d =" http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable =" d"
d:DesignHeight =" 300"
d:DesignWidth =" 400">

< Grid>
< StackPanel Background =" Yellow">
< TextBlock Text ="输入一些输入jlsjldjflajljsldfljlajsljdfljlasjldjl"字号= QUOT; 55" />
< TextBox Height =" 55" />
< / StackPanel>
< / Grid>
< / UserControl>






在后面的代码中,使用Popup.IsOpen打开或关闭弹出窗口

 ParentedPopup.IsOpen = true 





请参考

Popup Class
了解更多信息。


最好的问候,


罗伊


Targeting build 15063 i can use this to change maxwidth of contentdialog

        <Style x:Key="MyDialog" TargetType="ContentDialog">
            <Setter Property="MaxWidth" Value="1200"></Setter>
            <Setter Property="MaxHeight" Value="1000"></Setter>
        </Style>

But when targeting build 16299 this does not work.

How do i get this to work ?

解决方案

Hi ConceptData

I could reproduce your problem. And I have reported this.

If you need a large alert, you could try to use popup instead.  Create a customized usercontrol and add the usercontrol in the popup.

You could refer the following codes:

  <Popup x:Name="ParentedPopup" HorizontalOffset="200" VerticalOffset="200">
            <local:PopupInputContent MaxWidth="1200" MaxHeight="1000"/>
        </Popup>


<UserControl
    x:Class="App1.PopupInputContent"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App1"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <Grid>
        <StackPanel Background="Yellow">
            <TextBlock Text="Type some input jlsjldjflajljsldfljlajsljdfljlasjldjl" FontSize="55"/>
            <TextBox  Height="55"/>
        </StackPanel>
    </Grid>
</UserControl>


In the code behind, use Popup.IsOpen to open or close the popup

ParentedPopup.IsOpen = true


Please refer Popup Class for more information.

Best regards,

Roy


这篇关于[RS3:1709] [UWP] ContentDialog在定位构建16299时设置maxwidth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆