I'm trying to create some drop-downs for a toolbar and want them to look like the Page Layout drop-downs in Word (such as the Orientation and Size menus).
I've attempted to do this using a ComboBox, but I can't figure out how to show the option name, rather than the selected item at the top of the ComboBox. Is it possible to make the C...
Hi experts,
I want to handle an event, whenever the Submenus of a menu item opens. Same for closing. how can I do this?
Thnks in Advance
Regards, Jawahar
...
HorizontalContentAlignment is not applied to textbox....
Here is the style definition:
<Style TargetType="TextBox">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
and here is the TextBox definition
<DockPanel LastChildFill="True">
<TabControl DockPanel.Dock="Top" Name="tabControl1">
<...
Update: I've corrected the post, so the question is closed.
Expected result:
Menu width must be equal to the main window width.
Here is full code:
<Menu Name="menu1" DockPanel.Dock="Top">
<Menu.Width>
<Binding Path="MainWindow.Width"
Source="{x:Static Application.Current}"
UpdateSourceTrigger="P...
I've currently created the class below. For some reason though I can't access the properties I've created through my xaml style.
Public Class Ribbon : Inherits Button
Private mpopDropdown As Popup
Public Property Dropdown() As Popup
Get
Return mpopDropdown
End Get
Set(ByVal value As Popup)
...
I've tried to search for an answer to this but I'm not having any luck. Basically I have a listview that is bound to a collection returned from a view model. I bind the selected item of the list view to a property in my listview in order to perform validation to ensure that an item is selected. The problem is that sometimes I want to ...
Hi experts,
I have a listbox whose itemssource is binded to some list, as follows,
<ListBox Name="li" ItemsSource="{Binding List1}" Grid.Column="1"/>
I handled the selection changed event of ListBox. On the selection changed event I refered the Parent object of the selected item(ie ListBox) using "selected item.parent as ListBox". Bu...
Hello!
I have a TabControl.
While clicking a button I want to add a new TabItems to the TabControl.
Among various techniques I've chosen to create UserControl inside of a DockPanel.
Everything works fine, except for the location of control on a new TabItem is not 0 and it is
not expanded on the main form resize.
Everything is quite simp...
Hello,
I'm starting with WPF and would like to show a Word 2007 like toolbar when selecting a text in text editor. The toolbar looks like this :
Would like to know how to achieve the following
fade in fade out effect on a toolbar
split buttons
Could you please point me to the ressources where to start or what standard WPF control...
Hi,
I am a very novice WPF programmer, so need help in some simple tasks.
1- As the image shows, I want the (+) tab(it's a tab created with TabItem as of now or should it be button or something else? :-/) to create a tab left to it, say (A1), pressing again, should create (A2), sort of like in tabbed browsers......... And if possible,...
I created a Datagrid, as shown in this figure --> http://img682.imageshack.us/img682/5109/datagrid.png
where user is supposed to enter data. In one of columns, I added Combobox.Now, the Datagrid won't allow me to enter data in the cells. IsReadOnly="False" was also not working, it was giving some "EditMode exception".
So, what I did wa...
I want to design a DataGrid in which I have option to "Group by" or "Arrange by" filtering, just like we have in outlook. In outlook or windows explorer we have option to change the view in accordance with what is selected in Group By option.
I am wondering if any one have any idea of this type of implementation or any open source in WPF...
We would like to use balloon messages as described in the UX Guide from Microsoft. I found some samples which uses native code from Windows Forms, but the native code requires a handle to the component which a bit difficult for a WPF application since it doesn't follow the same concept.
I found some sample code which uses WPF's decorato...
I have a custom WinForms ActiveX toolbar control that I want to add to a WPF form. One of the options on the toolbar is to exit the current application.
How can I make the control raise/bubble an event to close the WPF window that contains the control?
...
Creating a relatively simple data entry form, and just want to separate certain sections with a horizontal line (not unlike an HR tag in HTML) that stretches the full length of the form.
I have tried this:
<Line Stretch="Fill" Stroke="Black" X2="1"/>
Because the parent control is not a fixed width, this line causes the window to stre...
I am using the following code to populate a wpf datagrid with items in my db4o OODB:
IObjectContainer db = Db4oEmbedded.OpenFile(Db4oEmbedded.NewConfiguration(), "C:\Dev\ContractKeeper\Database\ContractKeeper.yap");
var contractTypes = db.Query(typeof(ContractType));
this.dataGrid1.ItemsSource = contractTypes.ToList();
Here is the XA...
In a custom WPF control I would like to set the width of the control to be a function of the Height. For example: Width = Height / 3 * x;
What would be the best way to accomplish this so that the control resizes (and initially sizes) correctly and fluidly?
Thanks,
David
...
I've tried searching up and down for this but can't find anything. I have a combobox in a listview. The listview is bound to a list of objects exposed through the controller that the datacontext is bound to. One of the properties of the items in the list is a string. I'm trying to bind that value to what's in the combobox.
Here is a...
I want to pass the Button Event Arguments as a CommandParameter on a WPF Button. What would be the syntax I should use?
<Button x:Name="btnMain" Command="viewmodel:ApplicationCommands.MyCommand"CommandParameter="{Binding ???}" />
...
This should be a very simple task, but for some reason I'm running into a lot of problems with it in WPF.
This is what I want to happen:
I have a bunch of controls in a window, including expander controls. I want to have scroll bars for that window, when content expands below the visible area. Also, the window is not of fixed width, it ...