Why won't this support horizontal scrolling?
<ScrollViewer>
<ItemsControl ItemsSource="{Binding Territories}" HorizontalAlignment="Left">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel CanHorizontallyScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollV...
Hi, I'm trying to make a grid that represent bookings over a month(excel style).
For this I have used the WPF Datagrid and defined my column in C# code:
for (int i = 0; i < noOfDaysInMonth; i++)
{
DataGridTextColumn tmpColumn = new DataGridTextColumn
{
Header = (i + 1).ToString(),
Binding =...
This is my question:
1.I have 200,0000 Employee object(Id,Name,Job,Address) store at a database.
2.I read all Employee object to Empolyee[].
3.I create a window form application
(1) I create a WPF UserControl(inside ListBox),name is "wpfUserControl1".
(2) I put "wpfUserControl1" into a window form.
(3) I set wpfUserControl1.listBox...
I am tring to debug whats wrong with my HTTP requests from another question here on SO. So i read abit about Fiddler and wanted to use it to debug my problem. But I cant seem to get traffic from my WPF application to go through Fiddler. I believe I need to configure a proxy. I am using a WebClient for a basic example, but I think i will ...
Hello,
As i was reading about ObservableCollection i came to know that it implements INotifyPropertyChanged which means whenever the view changes it's underlying collection also gets updated automatically which is exactly what is the purpose of TwoWay databinding. So, what is the difference between ObservableCollection and TwoWay databi...
Whenever I am doing XAML, I tend to run into problems with databinding. It is often small issues, such as misspelling a property name.
My problem is, that I don't seem to receive any errors or warnings when I am trying to bind to a property that does not exist. It would be nice to get a warning, either at compile or runtime, about my e...
Hi,
To navigate to a specific page in the assembly, the typical code looks like:
NavigationService.Navigate(new Uri("pagename.xaml", UriKind.Relative));
I was wondering if there is a way to read the contents of this XAML file or may be
a way to decompile the embedded BAML file from the assembly directly.
...
I have an application which has to monitor 211 rods, and every 5 seconds it will update 2 ListBox controls, each one containing either the inserted rods or the removed ones. When I manually use the button for inserting/removing rods the code executes perfectly and the ListBoxes update properly. When I use the global button which inserts ...
Hello,
I have a UserControl with a RichTextBox in it. It must be disallowed to drag/drop Text within the RichTextBox so the user can not change the visible sort order of the strings in the RichTextBox.
But... it must be allowed to the user to drag/drop Text outside the UserControl to the same kubd if the UserControl.
Is that somehow p...
Hello,
How can I make binding between properties of two elements inside dataTemplate ?
example :
// Bind Text property to Content property
<DataTemplate>
<TextBox Text="{Binding}" />
<Label Content="{Binding}" />
</Datatemplate>
...
I've been struggling with this for hours and I can't find out what I'm doing wrong. Please help me find my mistake.
I created a user control with one custom dependency property and I want to animate this property.
Here is my class:
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComp...
I've created a design in AdobeIllustrator. Then I opened design in Microsoft Expression Blend, and got entire XAML code of the design.
I tried to apply the XAML and create custom button with the same shape as in my original design. This is what I did:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
...
I am adding a validation rule to a textbox (following examples on WPF 4 Unleashed by Adam Nathan)
When starting an application, I am faced with the following cryptic error message
Provide value on 'System.Windows.Data.Binding' threw an exception
What does the error mean and what needs to be done to address the problem?
Here is...
Hi,
I am working in a very crucial wpf project.This project is almost finished apart from some points.
I am showing flowdocumentreader which is loaded with dynamic images around 100.
I have one requirement to show page turn effect whenever user navigates to pages in flowdocumentreader.
I have used google and seen lots of example bu...
I recently changed my XAML in order to gain the capability to right-justify menu items such as setting font sizes in the below graphic:
File Configure Help
+-------------+ +----+
| Font size > |->| 8 |
| Speed > | | 10 |
+-------------+ | 12 |
+----+
Obviously, based on that gr...
I need to create table that all ListViewItem of this table will be build hold
1. Image
2. Text
3. Button
How can i do it ?
...
I'm using prism to load views to region. The problem is the loaded view overlapped the title bar of the main windows - the bar contains caption, close/minimize/maximize buttons. How can I get the title bar's height? Prefer to get it right in the xaml codes.
...
Hi
Since I am pretty new to WPF FlowDocuments I would like to ask if the code below is correct. It is supposed to return all Images contained in a FlowDocument as List:
List<Image> FindAllImagesInParagraph(Paragraph paragraph)
{
List<Image> result = null;
foreach (var inline in paragraph.Inlines)
{
var inlineUICont...
Hi,
Platform: WPF, .NET 4.0, C# 4.0
Problem: In the Mainwindow.xaml i have a ListBox bound to a Customer collection which is currently an ObservableCollection< Customer >.
ObservableCollection<Customer> c = new ObservableCollection<Customer>();
This collection can be updated via multiple sources, like FileSystem, WebService etc.
To ...
How can i select the WPF datagrid row when i click the right mouse button. I need to show the context menu in the datagrid but i am able to generate the context menu but selected row i not changing.
How can i solve this issue.
...