I need to handle multiple panels, containing variuous data masks. Each panel shall be visible using a TreeView control.
At this time, I handle the panels visibility manually, by making the selected one visible and bring it on top.
Actually this is not much confortable, especially in the UI designer, since when I add a brand new panel I...
When i write something like this:
<Style x:Key="panelS">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="DockPanel.Dock" Value="Top" />
</Style>
I get the error that says: Cannot resolve the Style Property 'Orientation'. Verify that the owning type is the Style's TargetType, or use C...
Hello,
At moment my main layout consists of vertically oriented stack panel and it looks like this:
Root StackPanel
StackPanel - fixed Height 150
(horizontal orientation)
StackPanel - relative Height must be
behalf of free space left on screen
(but at least 150 px). Used by Telerik
GridView Control, if I don't specify Height or Max...
Hi folks,
I am using Silverlight 4 with Blend 4.
I have a (horizontal) stackpanel that includes some TextBoxes and a Button. The stackpanel is set to stretch to the size that the content uses. The TextBoxes are on autosize too.
When I add text to the Textboxes, the textbox size grows and the stackpanel grows too. So far so good.
When...
I am building a layout in Silverlight 4, and am trying to display some thumbnail images horizontally with a horizontal scrollbar. To do this I tried using a StackPanel with Horizontal Orientation, but the resulting images are always displayed Vertically.
<ScrollViewer Height="140" VerticalAlignment="Top" VerticalScrollBarVisibility="Hid...
I have a StackPanel in my View:
<StackPanel x:Name="VariablesPanel"></StackPanel>
And I want to add into this StackPanel other StackPanel which I build in ViewModel.
this._unityContainer.Resolve<DeductionView>().VariablesPanel.Children.Add(allStackPanel);
and it doesn't work... I have no idea why... If i use this method in codebehi...
I have a stackpanel with checkboxes.
I cant seem to make same spacing between checkboxes with margin property
Can some1 tell me what am i doing wrong?
The code below gives me this:
As you can see, the spacing between elements is not constant !
<StackPanel MinWidth="150" cal:Bind.Model="{Binding}" Orientation="Horizontal">
<Stac...
I tried the suggestion here regarding Stretching, but it didn't work for me.
I have a TabItem that hosts a UserControl that is essentially just a ListBox with an ItemsPanel. The ItemsPanel forces the ListBox to display its contents horizontally. The contents of the ListBox are databound to an ObservableCollection<StackPanelContents>, ...
I have a horizontal StackPanel with an image and another StackPanel. The inner StackPanel is vertical with two TextBlocks both of which have TextWrapping set to Wrap. However when the text gets wide the inner StackPanel increases in width so that the TextBlocks don't wrap. The outer StackPanel is staying with the grid layout space it h...
I'd like to build a custom StackPanel with a ReverseOrder property that I can declaratively set to true to have the elements in the StackPanel appear in the opposite order of normal (e.g. bottom to top or right to left). It needs to be reversible on the fly.
I'm thinking of deriving a new class from StackPanel, but I need to know what m...
<StackPanel Name="mypanel">
<ScrollViewer Height="{Binding ElementName=mypanel, Path=ActualHeight}">
I need, that Height = mypanel.ActualHeight-60.
How to do it?
...
I am trying to design a template for a TabItem using paths and rectangles. The sides of the tab layout are paths to accommodate curves in the design. I am having a problem with getting the sides to line up/resize correctly. Here's my XAML:
<StackPanel Orientation="Horizontal">
<Path Stretch="UniformToFill" Fill="#FF000000" Data="F1 ...
I have a WPF with content in it, and would like to print it. Using
PrintDialog pd = new PrintDialog();
if (pd.ShowDialog() == true)
pd.PrintVisual(textStack, "Chinese Pinyin Text");
to print however, means that if I resize my window, some stuff will get cut off. How can I print it and ensure a standard 8.5x11 piece of paper with a...
I have a stackpanel as a place holder, and i would like to add multiple controls to it depending on user input. The problem i have having is that i get a "The property 'Template' was not found in type 'System.Windows.Controls.StackPanel'. [Line: 104 Position: 34]"
Here is my xmal
Style Element
<Style TargetType="StackPanel"...
I have the following xaml:
<StackPanel Orientation="Horizontal" x:Name="HeadlineSP">
<TextBlock x:Name="CanvasHeadline" Text="Sample" Margin="8,8,0,0" />
<Image Source="http://localhost/myimage.png" />
</StackPanel>
when i update the text of CanvasHeadline the Image does not move right to left dependiong on the wid...
Hallo,
i want to make a custom stackpanel in WPF, which shall automatically resizes his childs to a certain size depending on the panels height. But the panels height is dynamic because it stretches to his parent. When i want to get the height (i tried all possibilities, see code), it is always 0 or not defined, although in the build so...
I have the following ListBox:
<ScrollViewer>
<!--Spec Definitions-->
<ListBox DataContext="{Binding SpecPackageSpecGroupListViewModel}" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling" ScrollViewer.IsDeferredScrollingEnabled="True"
...
I have grid in a WPF window and a DataGrid control inside:
<Grid>
<DataGrid ItemsSource="{Binding AllAuthors}" />
</Grid>
AllAuthors is an ObservableCollection<Author> and Author a simple class with only a few string properties. The collection is populated with around 40000 objects in code behind. The DataGrid opens quite quickly ...
hello everybody,
i m looking for to add dynamically a user interface element inside my stack panel
here 's my code
<DataTemplate x:Name="Mydt" >
<Border Name="border" Padding="5" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
...
Hello!
I have an Expander that its content consists of a StackPanel that contains several elements one of whom is a TextBox.
I want, that when the Expander expands that TextBox should gain keyboard focus, how do I do this?
I tried:
Private Sub xp_Expanded(sender As Object, e As RoutedEventArgs) _
Handles xpUnits.Expanded
...