dockpanel

WPF Dockpanel first child uses remaining space

旧城冷巷雨未停 提交于 2020-01-11 20:21:12
问题 In a window I have there is a list of DockPanel s to specify a couple of files. Each DockPanel has a TextBox (for the path) and a button (to browse for a file). I've recreated a simple WPF page to demostrate the problem here: <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="150" Height="22"> <DockPanel> <TextBox HorizontalAlignment="Stretch"/> <!-- path to file --> <Button Content="..." DockPanel.Dock="Right"

DockPanel Tab Order

痴心易碎 提交于 2019-12-23 06:56:27
问题 I have a DockPanel set up in the DataTemplate of an ItemsControl as below: <ItemsControl HorizontalContentAlignment="Stretch"> <ItemsControl.ItemTemplate> <DataTemplate> <DockPanel> <ComboBox DockPanel.Dock="Left"/> <ComboBox DockPanel.Dock="Left"/> <Button DockPanel.Dock="Right">Button</Button> <!-- This will appear before the button...it has to go after it in the XAML so it will fill properly in the DockPanel --> <TextBox DockPanel.Dock="Left" MinWidth="100" HorizontalAlignment="Stretch"/>

DockPanel Tab Order

时光总嘲笑我的痴心妄想 提交于 2019-12-23 06:56:05
问题 I have a DockPanel set up in the DataTemplate of an ItemsControl as below: <ItemsControl HorizontalContentAlignment="Stretch"> <ItemsControl.ItemTemplate> <DataTemplate> <DockPanel> <ComboBox DockPanel.Dock="Left"/> <ComboBox DockPanel.Dock="Left"/> <Button DockPanel.Dock="Right">Button</Button> <!-- This will appear before the button...it has to go after it in the XAML so it will fill properly in the DockPanel --> <TextBox DockPanel.Dock="Left" MinWidth="100" HorizontalAlignment="Stretch"/>

How to make items in a DockPanel expand to fit all available space in WPF?

点点圈 提交于 2019-12-21 07:56:18
问题 I have a StackPanel containing a StackPanel and some other items. The first StackPanel has a vertical orientation, the the inner one has a horizontal orientation. The inner one has a TreeView and a ListView , I would like them to expand and fit the width of the window, which I set by the window and allow the user to change. I would also like the outer StackPanel to fit the height of the window. How do I do this? Edit: I've converted to using a DockPanel , and I've set the DockPanel.Dock

How can I get Silverlight 4 Tools to work in Web Developer 2010 Express?

我只是一个虾纸丫 提交于 2019-12-21 07:11:59
问题 I installed Windows 7 . I then installed Web Developer 2010 Express from here with the Web Platform Installer . I then installed the the April 15 release of Silverlight 4 Toolkit from here. I then added this reference : alt text http://www.deviantsart.com/upload/ijk0lm.png Then in my XAML, I reference it like this but it gives me no intellisense and tells me that I am missing an assembly reference : alt text http://www.deviantsart.com/upload/cd4vrj.png update: xmlns:tk="clr-namespace:System

Is it possible to style the contents of a DockPanel to fill the last *visible* child?

感情迁移 提交于 2019-12-20 01:07:16
问题 Consider this XAML snippet... <DockPanel x:Name="TestDockPanel"> <Button x:Name="RightButton" Content="Right" DockPanel.Dock="Right" /> <Button x:Name="FillButton" Content="Fill" /> </DockPanel> As written, the DockPanel will layout 'RightButton' to the right, then fill the rest of the area with 'FillButton' like this... We're trying to find a way to style it so that when 'FillButton' has its visibility changed to 'Collapsed', 'RightButton' should now fill the area, like this... The only way

QuickSharp - set floating form size

两盒软妹~` 提交于 2019-12-13 19:22:38
问题 Using the QuickSharp SDK , how do you manage the size of a window if it is floating? I want to set the MinimumSize for a floating panel that is created when a plugin is loaded. QuickSharp uses the WeifenLuo DockPanel Suite, and there is a way to manage the windows with that, but it isn't so obvious how to use this code with QuickSharp because QuickSharp creates its own docking classes from the underlying WeifenLuo library. Sure, you can sniff it out via the source code, but there is a lot of

How to add TextBlock text value from database object value

僤鯓⒐⒋嵵緔 提交于 2019-12-13 08:36:06
问题 I'm working on WPF application which has one Window.xaml where I'm using dataGrid which is filled from Database (MSSQL 2008R2), In that dataGrid I'm loading orders from my Database. I'm also grouping my orders by numberOfOrder, and its possible to expand them or to collapse them, in case there will be many orders at same time. Anyway, inside of my expander Is DockPanel, which has textBlock there, I used that textBlock to display number of each order from database, but I am wondering how could

Two dockpanels inside another dockpanel

∥☆過路亽.° 提交于 2019-12-11 11:13:24
问题 How to get these dockpanels right ? <DockPanel Grid.Row="1" LastChildFill="True" HorizontalAlignment="Stretch"> <DockPanel Width="400" LastChildFill="False" HorizontalAlignment="Left"> <DockPanel> <TextBlock Width="400" /> </DockPanel> <DockPanel Height="35" DockPanel.Dock="Bottom" LastChildFill="False"> <Button x:Name="btnRefresh" Content="Refersh" /> </DockPanel> </DockPanel> The DockPanel with the TextBlock spans over the DockPanel that is docked at the bottom, I want it to fit right up to

Only one DockContent in DockPanel

谁说胖子不能爱 提交于 2019-12-11 09:22:47
问题 Here is how my setup looking: This is the DockPanel suite. The white area is dockPanel visual component I has dropped on form. I don't need any docking, nested docking, droppable tabs, etc. I just need one "ProjectsForm" panel and want it to auto hide and hide by user clickings. So, my questions is how can I transform previous picture to look like this new one: How can I forbid to make this one panel float? Here is some code: private void MainForm_Load(object sender, EventArgs e) {