|
I need to perform some action on AutoGeneratingColumn event of wpf DataGrid.
But i can`t use generated event handlers.So i wonder can i specify somehow(by "gesture")that once AutoGeneratingEvent occurs SomeCommand should be executed.
Smth like:
<toolkit:DataGrid.InputBindings>
<MouseBinding Gesture="LeftDoubleClick" Command="local:RegistryTab.ShowServiceDescriptorDialogCommand"/>
<UnknownBinding Gesture="AutoGeneratingColumn" Command="local:RegistryTab.AutoGeneratingColumnCommand"/>
</toolkit:DataGrid.InputBindings>
|
|
|
|
|
I have a button, and its background image is a bmp file. Background of image is black. How to make this black color transparent
|
|
|
|
|
|
You just could set the transparency mask of the image control that is hosted inside your button ...
The fileformat of the picture hosted inside the imagecontrol is not important at all.
cheers noodles
Tztztztz ....
Sorry, is this a Windows.Forms Button ? If so, my answer is only for WPF ... This comes from quick and dirty reading ...
|
|
|
|
|
Thanks for your reply. I fixed my problem by using icom image instead of bitmap as background of button. It is also possible to create transparent image using photoshop.Go through the link
http://www.mediacollege.com/adobe/photoshop/transparent/background.html
|
|
|
|
|
Hi,
When i publish and run my silverlight application I am geting
"The connection to the server was reset while the page was loading." error and the page is not opening. Also in the url it is displaying like "localhost.com"
If anyone have any idea to resolve this please reply me.
Thanks in advance.
|
|
|
|
|
Did you leave a localhost URL somewhere, perhaps in your HTML or web.config?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark Salsbery,
Thank for your reply.
I didn't set any where like localhost.com and also I searched throught out te project and didn't found any thing like that.
If you have any idea to do this please reply me.
Thanks in advance.
|
|
|
|
|
How are you hosting? IIS? Local computer or remote server?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
similar issue with me but I am not using silverlight
debugging a simple aspx page
|
|
|
|
|
akshayavat wrote: I am not using silverlight
debugging a simple aspx page
Then posting on the ASP.NET board would be more appropriate.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Is it possible to dynamically load a usercontrol from a (.net) library?
|
|
|
|
|
All the "built-in" controls you use are dynamically loaded from libraries
so I'd say yes, it is possible.
Add a reference to the library, create an object of a public class that's
in the library, and go...
Or did you mean to ask something more specific?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello Mark!
Thanks for the prompt answer!
I need to be more specific ...
When the (WPF) windows loads I want to load a UserControl from pos.dll for example.
How do you add dynamically controls in a WPF window ?
|
|
|
|
|
koyllis wrote: I want to load a UserControl from pos.dll for example.
Mark Salsbery wrote: Add a reference to the library, create an object of a public class that's
in the library, and go...
private void MyWindow_Loaded(object sender, RoutedEventArgs e)
{
MyUserControlNamespace.MyUserControl = new MyUserControlNamespace.MyUserControl();
...
< do something with the freshly loaded user control >
}
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I want to use Conditional Compilation Directives (#if, #endif) in my XAML file as well as in the codebehind file. Can anybody provide me links or sample code?
Is there any other technique to do the same? Please guide me.
ex.
#if TASK
<Button Click="AddTask">Add Task</Button>
#else
<Button Click="AddContact">Add Contact</Button>
#endif
|
|
|
|
|
You can only use the Conditional Compilation Directives in code behind. As you can see, they are not valid XML, so they are not suitable for use in XAML. From the look of the quick sample you've posted, you might want to use DataTemplates, Template Selectors and the MVVM pattern. Have a look at Josh Smith's article on MSDN to get a better understanding of this.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Can you please provide me the link?
|
|
|
|
|
I can do better than that - I can give you an idea of how I think, which hopefully means you can perform the same actions as me in future. This should mean that you don't have to wait for others to give you answers, instead you will be able to do your own research, saving you time, and increasing your effectiveness as a developer.
First of all, I thought to myself - how can I find the link to this article? I can't remember the URL of this article, but I can think of some mechanism which will allow me to look something up off the internet. So, once I've ascertained that I can't remember the URL directly, I know that I need to look it up from a search engine. At this point, I need to think of the keywords that will help me perform an effective search. Well, we know that the article was written by Josh Smith, we also know it was written for the MSDN magazine and it was about MVVM, so I can make an educated guess at the keywords; namely Josh Smith MVVM MSDN magazine. A quick hop on over to Google and I enter these keywords, hit search and what do you know, the first result is the one I want[^].
When you can think how to search for answers yourself, and not rely on others to do the searching for you, you will be able to make drastic leaps forward in your effectiveness and ability as a developer.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: Google
Here is an officialy recommended way to share Google links to your friends: http://lmgtfy.com/[^]
Yours sincerely -
- Google search engine development team
Greetings - Jacek
|
|
|
|
|
Jacek Gajek wrote: Here is an officialy recommended way to share Google links to your friends: http://lmgtfy.com/[^]
Give a man a fish, and he'll eat for a day.
Teach a man to fish, and he'll buy expensive rods and dodgy waders.
The moral of the story here - it's better to be the supplier to the person who teaches a man to fish; offer sufficient kickbacks and you'll never run out of business.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hey man thanks for your reply. However I googled and got the link before you give. I thought you could have given me the idea after searching Google. So the link could be recorded in your browser history. That could save time for me to search again.
However I am not looking for Routed Templates. I am looking for conditional Compilation in XAML, in which I can set the Parameters in the Project file and Include/Exclude some XAML output. I followed the article http://www.removingalldoubt.com/commentview.aspx/defa2a7d-b1e9-49eb-b8c8-438348be8d18[^] and solved the problem. I am posting this so that others can also refer to this solution.
|
|
|
|
|
Give a man a fish, and he'll eat for a day.
Turn a man into a fish, and he'll be eaten for the rest of his life.
|
|
|
|
|
In a SL 3 C# app there is a page named MainPage that contains a TabControl with some TabItems.
In the Page_Load event a user control is instantiated and added inside the MainPage's first TabItem.
For the sake of simplicity, the user control has only one button. I want to click this button and change the selected index of the TabControl .How?
To access the TabControl inside the MainPage directly I will need to create a static method but it will require the tabControls to be static as well and I definitely don't want to do that (Don't even know how).
Can someone show an example on how to access the MainPage's TabControl from inside the user control?
Thanks a lot!
|
|
|
|
|
I personally don't think a usercontrol should have intimate knowledge
of its parent tree so I would go with a different design - perhaps
add an event to the usercontrol that is raised when the button is clicked.
The parent of the usercontrol could subscribe to this event and handle the
tabcontrol appropriately.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|