tabcontrol

WPF: weird problem in dataBinding with TabControl

此生再无相见时 提交于 2019-12-14 02:27:25
问题 i'm trying to use DataBinding for dynamically populating a TabControl but have a problem; dataBinding runs fine but i would like the content of each TabItem to be independent one from the other. Here is my XAML code: <TabControl DockPanel.Dock="Left" ItemsSource="{Binding OpenChats}"Name="tabChats" VerticalAlignment="Top" Width="571"> <TabControl.ItemTemplate> <DataTemplate > <TextBlock Text="{Binding Name}"/> </DataTemplate> </TabControl.ItemTemplate> <TabControl.ContentTemplate>

Validation Summary in TabControl (Silverlight 4)

谁说我不能喝 提交于 2019-12-14 02:01:30
问题 everyone. Here is my question. I'm using MVVM pattern in my project and i have a UserControl, which has a TabControl on it. TabItems have validations on them. Main page looks like this: <UserControl> <DataInput:ValidationSummary x:Name="ValidationSummary"/> <Grid x:Name="LayoutRoot"> <DataInput:ValidationSummary /> <TabControl x:Name="TabControl"> <TabItem> <MyUserControl1 DataContext="{Binding}" /> </TabItem> <TabItem> <MyUserControl2 DataContext="{Binding}" /> </TabItem> <TabItem>

Difficulty with tabControl/tabitem refresh

被刻印的时光 ゝ 提交于 2019-12-14 01:17:17
问题 I have a WPF window with a maintabWindow and several tabitems. It normally works fine and the layout is this: but when I BEFORE add the following window: the result is this: So the problem is related with the tabControl/tabItem refresh. This is fairly obvious but even more because if I move the window or pass with the mouse on the a tabItem they get refreshed one by one. I searched and found that here is a solution: http://geekswithblogs.net/NewThingsILearned/archive/2008/08/25/refresh-

SketchFlow / Using (Selected) TabItem in TabControl to Trigger State

风流意气都作罢 提交于 2019-12-13 21:15:47
问题 Context: A new Sketchflow / Silverlight project. Expression Blend 4 (Ultimate) I have the below code. I have a TabControl with 2 TabItem's. I also have 2 "callout" (big bubble things) as quick visual on the state change. I created a VisualStateGroup and added to States under it. When I manually invoke these from the NAVIGATE window (after I run the project), the states work as expected. callout1 and callout2 flip flop their opacities (between 100% and 10%). So I have a basic understanding of

TabControl without border wpf (XP)

梦想的初衷 提交于 2019-12-13 15:03:51
问题 I'm experiencing a visual issue with styling a TabControl in WPF. So even if I set the border of the tab control to be 0px and transparent there is still a very thin line on the right and bottom borders. I didn't manage to find the property which would resolve that, so maybe someone experienced the same issue and could share it. Thanks in advance, Boris 回答1: Are you sure its part of the border and not the DropShadowEffect? You'll have to override the ControlTemplate to get rid of the border

Search through Tab Control for specific Tab Item based on a String value

对着背影说爱祢 提交于 2019-12-13 14:28:20
问题 I would like to know how to select a tabItem in a tabControl whose name matches a specific string value. I'm guessing that I will have to do some sort of search. Here's a visual example: string selectedTabItem = "TabItem"; //if there exists a Tab Item in this specific tab control //with the above string as it's Name //that Tab Item .IsSelected = true; 回答1: Assuming that you create your tabs manually, and not via bindings, then this should work: tabControl.SelectedItem = tabControl.Items

Programmatically access controls on GroupBoxes that are on multiple Tab Pages

*爱你&永不变心* 提交于 2019-12-13 07:51:05
问题 How can you programmatically access controls on Tab Pages? My code has many properties that I want to allow the user to initially set when the program starts. These properties will be used to define an Excel chart like title name, font colors, font size, chart position and size, X & Y series and many others properties. The program produces many charts each of which have their own set of properties. Each chart has the same set of properties but different values. My solution using Form1

Draw controls in tab control tab header area in Winforms

妖精的绣舞 提交于 2019-12-13 06:19:06
问题 I am trying to add some controls to the left of the tab header area for my tab control but not affect the tab page area (like internet explorer). I think I would have to owner draw the control, but I'm not sure where to start. Can anyone offer any suggestions? 回答1: Have you searched before you ask you question mate ?!! there are many articles outside. I think the following links are exactly what you want, take a look. Y(et)A(nother)TabControl: A Custom Tab Control With Owner Drawn Tabs

How to disable the dashed contour for TabItem?

笑着哭i 提交于 2019-12-13 02:48:44
问题 When a TabItem has focus it shows an inner dashed countour. How to make it transparent or to disabling it to get focus at all? 回答1: If you're talking about the FocusVisualStyle you can remove it by adding the following to your TabControl <TabControl ...> <TabControl.Resources> <Style TargetType="TabItem"> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> </Style> </TabControl.Resources> <!-- ... --> </TabControl> Update To make sure we're talking about the same thing Selected with

How to sort TabItems in the TabControl

谁都会走 提交于 2019-12-13 02:27:40
问题 I have a collection of type Page with an Order property, I set ItemsSource property of a TabControl an ObservableCollection. What I need to whenever I changed the Order property of an Entity the related TabItem go in the correct location. WPF XAML : <TabControl Grid.Row="1" ItemsSource="{Binding Pages.ListViewModels}" SelectedItem="{Binding Pages.Current}" > <TabControl.ContentTemplate> <DataTemplate> <views:EditPageView /> </DataTemplate> </TabControl.ContentTemplate> <TabControl