I have a stack of silverlight and I want to set its width to 100%.
I am adding a dynamic stack panel (C #)
Try setting the HorizontalAlignment to "Stretch" on your StackPanel and make sure that your containing element is also the width you expect.
private void CreateMyDynamicStackPanel() { StackPanel MyStackPanel = new StackPanel(); MyStackPanel.HorizontalAlignment = HorizontalAlignment.Stretch; MyStackPanel.Width = 300; }
Instead of 300, use the property of the parent container?
Source: https://habr.com/ru/post/1316282/More articles:New in the EJB world ... Exceptional pointer exception in the EJB client - javaHow to get raw request in PHP? - postInstall the application in program files instead in the user profile using ClickOnce - winformsQR Code Reader for BlackBerry - componentssqlite: multi-column primary key with auto-increment column - databaseCan I enable stored procedures when using edmgen.exe? - linq-to-entitiesProvide information between ASP.NET applications in the same IIS - query-stringCreating SVG markers programmatically using Javascript - javascriptvideo format converter using java - javaRegister a method in Python - pythonAll Articles