ContentDialog max width


I'm trying to create a settings menu in my app like this

<a href="https://i.stack.imgur.com/QYwzM.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/QYwzM.png" data-original="https://i.stack.imgur.com/QYwzM.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

I know how to do it but I have a problem with the width on content dialog, apparently there is a limit on width.

Here's code for my content dialog:

Title="" Margin="12,0,-12,0" HorizontalAlignment="Stretch" Width="800" Height="600" VerticalAlignment="Stretch" Background="{x:Null}"> <Grid x:Name="Main" ScrollViewer.VerticalScrollBarVisibility="Auto" Width="800"> <Grid.RowDefinitions> <RowDefinition Height="58"/> <RowDefinition Height="58"/> <RowDefinition/> <RowDefinition Height="76"/> </Grid.RowDefinitions> <TextBox x:Name="Title_TextBox" Text="" Margin="10,10,10,0" PlaceholderText="Please enter your story title..." RequestedTheme="Light" FontSize="16" MaxLength="50" Grid.Row="1" /> <TextBox x:Name="Experience_Text" Text="" Grid.Row="2" Margin="10,10,10,0" PlaceholderText="Please tell your experience..." MaxLength="500" FontSize="16" TextWrapping="Wrap" MinHeight="42" AcceptsReturn="True" RequestedTheme="Light" ScrollViewer.VerticalScrollBarVisibility="Auto" VerticalAlignment="Center" Height="190" /> <Grid x:Name="CharacterGrid" Grid.Row="3" Margin="10,0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="48"/> <ColumnDefinition Width="64"/> <ColumnDefinition/> </Grid.ColumnDefinitions> <TextBlock x:Name="CharacterLeft" Margin="0" TextWrapping="Wrap" Text="" TextAlignment="Right" FontSize="16" Grid.Column="2" VerticalAlignment="Top" RequestedTheme="Light" /> <Button x:Name="CameraButton" FontFamily="Segoe MDL2 Assets" Content="&#xE722;" Background="Transparent" VerticalAlignment="Top" Margin="0,5,0,0" HorizontalAlignment="Left" FontSize="21.333" RequestedTheme="Light" Width="48" Height="48"/> </Grid> <Grid x:Name="LocationGrid" Margin="10,10,10,0"> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition Width="48"/> </Grid.ColumnDefinitions> <TextBlock x:Name="LocText" Margin="0" TextWrapping="Wrap" Text="Location will be here...." FontSize="16" VerticalAlignment="Center" RequestedTheme="Light" TextAlignment="Center"/> <Button x:Name="LocationButton" FontFamily="Segoe MDL2 Assets" Content="&#xE81D;" Background="Transparent" VerticalAlignment="Center" Margin="0" HorizontalAlignment="Right" FontSize="21.333" RequestedTheme="Light" Width="48" Height="48" Grid.Column="1"/> </Grid> </Grid>


In your App.xaml, try setting the ContentDialogMaxWidth to say, 800. The default is 548. You might want to increase the height too.

<Application.Resources> <x:Double x:Key="ContentDialogMaxWidth">800</x:Double> <x:Double x:Key="ContentDialogMaxHeight">756</x:Double> </Application.Resources>


just add this code after the initialize component

this.width = Window.Current.Bounds.Width;

and the content dialog will get your screen width


All that I Have to do is just add this code after the initialize component

this.width = Window.Current.Bounds.Width;

and the content dialog will get your screen width.. thanks everyone hope this will help anyone search for it !


  • Lib Gdx json serializationexception and missing no-arg constructor
  • Spring Boot: How to disable startup log message “Starting Application on mbp with PID 99446”
  • C: Correct way to print “unsigned long” in hex
  • Why is _Alignof missing from the rule about converting an array to a pointer?
  • How to get a second bibliography?
  • how to convert map into set
  • Spring, Interceptor's excludePathPatterns function is not working properly
  • Python extension: symbol(s) not found for architecture x86_64 error
  • Why does getContextPath() under a proxy return the internal path inside HttpServlet but not inside F
  • How to detect a process cpu/memory usage and kill it when it exceeds a certain value? [closed]
  • ProgressDialog.show inside AsyncTask stop my Program from execution
  • cq5 accessing osgi servlet through Url
  • Is it possible to reorder or ignore parameters in controller routes?
  • How to remove item from Panel
  • matching end of string
  • ggplot in R: how to set alignment individually on axis labels
  • How can I send data in text field using Selenium?
  • How to clone select and range inputs in jQuery mobile 1.3.2
  • Qt WebView and WebChannel over WebSockets in QML
  • In Python ElementTree how can I get list of all ancestors of an element in tree?
  • R SparkR - equivalent to melt function
  • Hibernate EmptyInterceptor onFlushDirty() is not executing
  • determine if drive is removable (flash or HDD) knowing only the drive letter
  • Error: packet sequence number wrong after upgrading RDS instance
  • NOTE or WARNING from package check when README.md includes images
  • Migrating MOSS 2007 from SQL 2000 to SQL 2005 [closed]
  • Multiple git user in single device
  • How to delete first 7 characters of folder name by using batch script?
  • Filtering out choiceless polls in the Django tutorial causes polls in the index to duplicate
  • Slick: How can I combine a SQL LIKE statement with a SQL IN statement
  • Auto send email based on the time and email address in database
  • What does “T extends Junk” mean in a generic class in Java?
  • Autocomplete source from project settings
  • ASP.NET MVC 2 actions for the same route?
  • How do I use libcurl to printf a remote FTP directory listing?
  • How to clear a browser cache in Protractor
  • ReferenceError: TextEncoder is not defined