Please help.
I have two relational tables which are Employee and EmployeePosition. I am trying to bind two tables into one datagrid on the xmal file without using LINQ to join those two table into one collection from the c# code behind. HOW CAN I DO IT?
The sample code and table below
Employee
EmployeeID
FirstName
LastName
PositionID
...
Please help.
I have two relational tables which are Employee and EmployeePosition. I am trying to bind two tables into one datagrid on the xmal file without using LINQ to join those two table into one collection from the c# code behind. HOW CAN I DO IT?
The sample code and table below
Empolyee
EmployeeID
FirstName
LastName
PositionID
...
Hello, I'm learning MVVM through a project and I got stuck on something simple.
I have a button that updates a Listview. I have a command in the ViewModel that make the right things but I want to select the new row and get the focus on a textbox after I click the button.
The question is: How do I update my UI after executing a command?...
Hi,
In WPF application I am currently trying to bind a Command to launch a calculator Tool form any where in the application using shortcut keys, I have created a command but not getting how to map commands and shortcut keys to create universal shortcut keys in my application.
Thanks in advance.
...
I'm experimenting with IronRuby and WPF and I'd like to write my own commands. What I have below Is as far as I can figure out.
class MyCommand
include System::Windows::Input::ICommand
def can_execute()
true
end
def execute()
puts "I'm being commanded"
end
end
But the ICommand interface defines the CanExecuteChanged...
I want to create a custom control so that I can do something like this:
<SideBySide>
<StackPanel SideBySide.Left="True">...</StackPanel>
<StackPanel SideBySide.Right="False">...</StackPanel>
</SideBySide>
I'm going to be using this all over the place, with obviously more options (sizing, etc.).
I've considered using a Panel s...
Is it easily possible to specify a margin and/or padding for rows or columns in a WPF Grid?
I could of course add extra columns to space things out, but this seems like a job for padding/margins (it will give much simplier XAML). Has someone derived from the standard Grid to add this functionality?
...
I need to calculate the logical width of a visual element, before it gets rendered by WPF.
For simplicity of explanation, I'll say that this visual element will likely be a Polygon object. It could be something else, but a Polygon makes it easy to visualize.
So the XAML might look something like this:
<Window x:Class="MyCLRNames...
I have done a WPF appliction using VS 2008 SP1 in Windows XP SP3. I copy the exe and dlls to my Windows 7 RC build 7100 machine. But the exe is not working. When I doubleclick on the exe, a message comes like 'Application stop working. windows is gathering the information'. Why this happends?
I am overriding the OnStartup function in Ap...
What is the difference by Keyboard focus and logical focus in WPF? and how WPF focus is different from the focus in winform ?
...
I'm trying to figure out a way to prevent F10 from activating the window menu (same function as pressing 'alt') and fire keydown/previewkeydown instead. I know there are ways to do it using window.forms, but I'm using WPF on VB.net and I can't seem to find a method that would apply.
...
I have a ListView in a Windows Form that I bind a list of objects to on the creation of the form. What I would like to do is on a button click loop through the items that were created and change their IsEnabled property to false. I've tried two methods and neither were particularly successful. Can anyone help fix these up and/or sugge...
I am wokring on a touch screen on a small device and the custom width of the scroll-bar is no good as one of my requirements is that everything needs to be doable by finger gestures.
How can I set the width of the WPF ScrollViewer scrollbar?
Note that I don't wanna change the width of all the scrollbars on the device (doable through wi...
HiI am using C# WPF webbrowser control to show html file in my local machine, I added a print feature to my application by executing print command of webbrowser control, but default behavior of Internet Explorer is to print file url in the bottom of the screen , can I turn header and footer printing for my control? Have WebBrowser contro...
Hi guys
I have implemented my MVVM error message as a message dialog that subscribes to error messages via a mediator class, so that other viewmodels can notify it if any errors occur.
When an error occurs, I set the visibility attribute in the viewmodel to Visible, to display the error window. This is all bound in the Error window fro...
I just noticed that when changing bound properties in my ViewModel (MVVM) from a background worker thread I do not get any exceptions and the view is updated correctly. Does this mean I can savely rely on wpf databinding marshalling all changes in the ViewModel to the UI Thread? I think I have read somewhere that one should make sure (in...
Lets say I have a canvas defined to be 1000x1000 big. Is it possible to only show a 100x100 part of it in a Viewbox(or a rectangel)?
Any help is apreciated.....
...
I am evaluating WPF and Silverlight for a Project. I find WPF to be most suited for our purpose since we require performance, graphics support, Office compatibility and the ability to support ActiveX controls. It is also a Desktop application. However there is one area where i find Silverlight to be superior - Media support. I would like...
Hi!
I want to make a reusable WPF Window suitable for different types T.
I have a designer and a codebehind file.
can I do something like this?
/* Code behind file */
public partial class MyWindows<T> : Window
{}
...
I made an application with animations in WPF with Visual Studio 2008 Team System and SQL Server 2005.
So I have Windows XP and Windows 7, in Windows XP that I have Visual Studio and SQL Server and Framework 3.5 it works very well, but in Windows 7 and in other computers it can not connect to database, first I thought it's about Framewor...