publicpartialclass MainWindow : Window
System.Windows.Forms.PropertyGrid grid = new System.Windows.Forms.PropertyGrid();
grid.SelectedObject = this; // Display the entire MainWindow's properties in the PropertyGrid
grid.Width = 200;
grid.Height = 100;
System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost();
host.Child = grid;
StackPanel panel = new StackPanel();
obj.ToolTip = panel;
Don't forget to reference to System.Sindows.Forms and System.Windows.Forms.Inegration DLL-files.
In the XAML code, notice I use a Button to be the host of the ToolTip. Any recommendation for a better object to host the ToolTip?
I then create the WindowsFormsHost object to host the PropertyGrid. Finally storing the WindowsFormsHost in a StackPanel which I assign to the Button's ToolTip property.
I was not able to assign the WindowsFormsHost to the Button's ToolTip property. obj.ToolTip = host; // Will Fail
That failed and throwed an ArgumentException when I hovered the mouse curser over the button. With a StackPanel it didn't crash.
When hovering the mouse curser over the button the result is just a white box and the PropertyGrid is not visible
Iam trying to configure a service for access over both https and http from a silverlight 4 application. I am able to access the service over https but not over http. I have made some research over the net but can't seem to get the configuration right.
Below is my current settings in the my web.config file.
What do i have mis-configured above that is making the calls to the service fail on http.
I cannot access the service via http but it works fine over https. And i have a requirement to support both https and http
Please help on the approach on how will I be able to create an WPF application with requirements below:
- The tool should allow the user to open an image file and draw rectangular areas on top of it that correspond to clickable portions of the image.
- Once the rectangular areas are already placed on top of image, the app will capture the Left, Top positions and Height and Width of rectangular areas.
I do wonder what your expectations for this message are?
Create a project
add a image control to the main form
add the controls to allow the user to select an image file
place the image on the form
create the controls to begin positioning the rectangles
record the position of the rectangles.
Just like you said!
Never underestimate the power of human stupidity
Well, when do you want to call Validate? Generally, I'd say you'd call a Validate method when you leave the control. If that's the case, you don't need to call it manually, just have the control call it by itself.