I have a wpf tab control which is highly customized through styles. I have referenced those styles in a resourcedictionary "TabControlResources". How do I reference "TabControlResources" in another resourcedictionary?. I have a resourcedictionary called "MainViewResources" and I would like to reference the tab style from my "TabContro...
Hello,
how can I bind the Content of a ContentControl to an ObservableCollection.
The control should show an object as content only if the ObservableColelction contains exactly one object (the object to be shown).
Thanks,
Walter
...
Hi all,
I am using wpf listview horizontaly. When i fixed the width of listview the horizontal scrollbar is shown automatically.
I want to change its appearence.
Like my listview shown on middle and both corners have scroll buttons left and right.
How can i achive this please let me know its urgent....
...
I've got 2 DataTemplates defined for a Listbox Control. 1 Template is for the UnSelected State and the other one is for the Selected State(showing more detail than the UnSelected State).
I followed the example here:
http://blogs.msdn.com/b/wpfsdk/archive/2007/04/16/how-do-i-programmatically-interact-with-template-generated-elements-pa...
hello all
i have a problem, i have some data in Datacontext and i want to fetch this data how can i achive it
thanks in advance
shashank
button1.DataContext = new DataView(tablename, "field1 in (" + stringbuilder.ToString() + "0)", "field1", DataViewRowState.CurrentRows);
...
Hey there.
I'm writing an application in WPF using the MVVM-pattern and will really often use TextBoxes.
I don't want to use labels for the user to know user what the text box is for, i.e. I don't want something like this:
<TextBlock> Name: </TextBlock>
<TextBox />
Instead, I would like the TextBox to contain its own label. Statical...
Hi there
I have a few usercontrols loaded into a tabcontrol via MVVM in WPF.
Within the XAML for the usercontrol I am setting focus to a textbox using the FocusManager, however this appears to only work when the first instance of the usercontrol is created.
Just to test I added a loaded event handler to the usercontrol - this is only ...
I have two Expanders in a grid, both in Auto sized rows.
When the height of the Expander is very large, the row overflows out of the grid.
Is there a way to have Auto sized rows that take only the grid space that's available?
...
I have two Line objects in C# WPF, and I'm trying to construct a method to work out the coordinates at which the lines intersect (if at all). After giving myself a headache reminding myself of high school maths to do this, I can't work out how to map it into programming format - anyone know how to do this?
Thanks very much,
Becky
...
Hi,
I have a ListView and ObservableCollection in my wpf application.
I want to bind linq expression to ListView:
lv_Results.DataContext = store.Where(x => x.PR > 5).ToList();
tempStore = new M1Store()
{
SiteName = siteName,
Date = date,
...
Hi!
I have ListBox with ScrollViewer
<ScrollViewer Focusable="False" CanContentScroll="True"
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled">
<ListBox ItemsSource="{Binding Path=MyItems}" VerticalAlignment="Stretch" Focusable="False">
...
Hi,
I've been using C# for a while and began a program now to learn WPF-which means I know almost nothing of it.
I used this tutorial as a guide to do what I wanted to do (which is binding a database to a datagrid), after a hard struggle to add the adapter as the source of the datagrid I now want to enable editing with validation on som...
I have been having problems with this for some time now, and have come up with some less-than-desirable solutions. The problem is that when a TreeViewItem's context menu is opened, the TreeViewItem is greyed out. Is it possible for a TreeViewItem to stay highlighted while its ContextMenu is open?
The problem with the TreeViewItem greyin...
Hi all,
I'm working on Expression Blend and I'm currently designing a custom control which has a Grid with 5 rows inside, and also has two Dependency properties: "Value", and "Maximum". Three of the rows have fixed height, and what I'm trying to do is set the remaining rows height to "Value/Maximum" and "1-Value/Maximum" respectively. H...
I'm rather taken with MEF and plan to use it to build a demo application to load different tabs. I am a begineer at MEF and WPF and although MEF is loading the assemblies I'm stuck at loading the controls into the TabItem I have created. My code looks a bt like this ..
foreach (var page in pages)
{
...
In XAML I can write something like this:
<Setter Property="PropertyName" Value="{Binding ...}" />
How would I do this in code? I've constructed bindings in code before, but I can't seem to find any static ValueProperty object on the Setter class to pass to BindingOperations.SetBinding().
...
I have a ListBox container data bound and templatized as so:
<ListBox x:Name="ListBox"
ItemsSource="{Binding Source={StaticResource List}}"
ItemTemplate="{StaticResource ListTemplate}">
</ListBox>
Within my ListTemplate resource, I define a Grid which contains a few child elements. I have setup a cli...
Hi,
I've started using mvvm-light toolkit , and new to WPF.
My question is:
I want to create an pplication where the main window includes a grid with 2 columns 1 col command and col2 will display views when each command will be pressed.
i want the views to be created on command and colsed from it's own view.
I've tried to figure out h...
I'm using Microsoft.Win32.SaveFileDialog in an app where all files are saved as readonly but the user needs to be able to choose existing files. The existing files being replaced are renamed eg: blah.png becomes blah.png-0.bak, blah.png-1.bak and so on.
Thus, the language for the OverwritePrompt is inappropriate - we are not allowing th...
I have wpf application in which I am using "ENTER" key as "TAB & Enter". If data are valid then move to next control.
My problem is that I want to raise TAB event programmatically. Please provide some code.....
...