|
Does not help me
<DataGrid x:Name="gridSelectProcess" Grid.Row="1" ItemsSource="{Binding Source=local:DataProcessList}" AutoGenerateColumns="True">
</DataGrid>
Only thing is that it shows are black empty lines
|
|
|
|
|
For datagrid you can try
WPF DataGrid Practical Examples[^]
Well, the example is using toolkit, but you can easily adjust the code to use your own DataGrid, as the process remains same.
You can also use
Grid using ListView[^] to create grid using Listview in WPF if you wish.
Abhishek Sur
Don't forget to click "Good Answer" if you like this Solution. Visit My Website-->www.abhisheksur.com
|
|
|
|
|
I did attempt to read that article. For me it confusing, because it uses DataSet and it is binded to northwind databas, while i wan't to use a custom class in non database driven source. (Such as .Accsess, MySQL or MSSQL). Gonna save in xml with a specific format. This format would be a collection of sevral diffrent types of items.
also Grid using ListView seems promesing gonna check it out.
Edit: Got it working, however i needed to put ItemSource in code behind, not in xaml.
Final question about datagrid. How do i make DataGrid to show images?
thank you for your time
modified on Wednesday, September 22, 2010 4:28 PM
|
|
|
|
|
hello
once more a post about the expander animation.
i found a lot of xaml examples for a animated expander during expand/collapse.
like this => http://mattserbinski.com/blog/animating-expander
but how can i do that programmatically in codebehind?
i have a usercontrol which gets added a dynamic created nested expander control (min. 3 level).
i would like to have a "global" animation ( for expand /collapse) for all expander controls inside the usercontrol.
how can i solve that ?
with a RessourceDictionary ?
thanks for your help
|
|
|
|
|
Why do you need to do this in codebehind?
I dont think it is a good idea to do this in codebehind. Even though you can do that easily using
StoryBoard classes.
tronix01 wrote: would like to have a "global" animation ( for expand /collapse) for all expander controls inside the usercontrol.
Use Style and define the style in App.Xaml.
Refer to the style using {StaticResource key}
I think you could better read about WPF resources from my articles :
http://www.abhisheksur.com/2010/05/new-wpf-learning-series.html[^]
I hope these would help you.
Abhishek Sur
Don't forget to click "Good Answer" if you like this Solution. Visit My Website-->www.abhisheksur.com
|
|
|
|
|
you are right. thanks for your reply.
|
|
|
|
|
Hi, this may seem like a stupid question, but I've looked everywhere and I couldn't find anything that could help me.
I'm developing a WPF project and in it I have two user controls, at the moment the first has only one button and the second is pretty much a canvas with a custom border.
Both of them have been added to the main window in their respective locations. What I want is, when I click the button in the first user control another control is added to the my second user control (canvas). Since I'm a bit desparate and confused about all this, I would just settle for a simple message box to show, with the code being written in the canvas code behind.
Everywhere I looked said that routed commands where the best option, but I cant seem to make them work. I should also say that I can make the routed commands work only inside the first user control.
Both user controls are in the same project, but have different namespaces.
I'd appreciate any help and I appologise if my question seems unclear.
Thanks
|
|
|
|
|
Well, generally WPF code is made data driven.
So from the Usercontrol use DataContext to pass a Dataobject on the User Control. Make the adjustment so that the user control loads something whenever the data object is modified. We use this by implementing the data class from INotifyPropertyChanged .
INotifyPropertyChanged[^]
Other than that you can also keep a property/dependency property to help load the object from outside.
Abhishek Sur
Don't forget to click "Good Answer" if you like this Solution. Visit My Website-->www.abhisheksur.com
|
|
|
|
|
Hello Experts,
Is it possible to check from Batch (.cmd or .bat) file, whether the Silverlight plugin has been installed. Also, I want the current installed version if it is already installed there.
Can anyone please help me to resolve it? Any kind of help is soliciated. Thanks in advance.
|
|
|
|
|
KunalChowdhury wrote: Is it possible to check from Batch (.cmd or .bat) file, whether the Silverlight plugin has been installed.
Why would you want to do this? Silverlight is meant to be installed from the web, and browsing to a page which requires an updated version will prompt the user to upgrade their version of Silverlight. If your application relies on the latest version, remember that the user will have browsed to it and it will run inside the security sandbox.
|
|
|
|
|
Pete O'Hanlon wrote: Why would you want to do this?
Actually Pete, I wanted to do some R&D on the Silverlight installation process for one of my new Article and hence I want to know whether I can do this from command prompt (i.e. from a batch file). I think, we can do this but not sure how.
Let me know, if you have any solution or any related links for the problem. Thanks for the response.
|
|
|
|
|
I would write a script to read the HKLM\SOFTWARE\Microsoft\Silverlight key in the registry.
For e.g. try this in a batch file to get the version.
ECHO OFF
REGEDIT /E %Temp%.\filename.REG "HKEY_LOCAL_MACHINE\Software\Microsoft\Silverlight\"
FOR /F "tokens=1* delims==" %%A IN ('TYPE %Temp%.\filename.REG ^| FIND "Version"') DO SET Version=%%B
SET Silverlight Version=%Version:"=%
SET Silverlight Version
DEL %Temp%.\filename.reg
PAUSE
This very simple script works for me.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi Abhinav,
Thanks for your response. But as it depends on the Regedit, will not work on MAC or Linux. Though my requirement is only for Windows, so I will check whether it will resolve my problem.
BTW, Directly working with Regedit is not a good idea. User can hamper anything if I put it as plain text.
Again, thanks for the response. I got some basic pointers. If you have any other proper way to do this, please let me know.
|
|
|
|
|
KunalChowdhury wrote: work on MAC or Linux
Yeah true.
I was wondering - is there a way to somehow go through the plugin list for the browsers using a batch file?
Or you could modify the script to find a different way to check on MAC.....just throwing up some ideas.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
modified on Tuesday, September 21, 2010 4:54 AM
|
|
|
|
|
Hi Abhinav,
I got some idea on what I have to do. I will create a simple HTA application which will give me the silverlight version using javascript and then based on the installed version, I will be able to run the silverlight installer thru Javascript silently.
Will publish an article soon.
|
|
|
|
|
I'm not sure it will be able to install silently. At the very least, I'd expect you to get a File Download - Security Warning as the installer is an .exe on Windows.
|
|
|
|
|
Pete O'Hanlon wrote: I'm not sure it will be able to install silently. At the very least, I'd expect you to get a File Download - Security Warning as the installer is an .exe on Windows.
I am planning to package the runtime as an installable for my application (for the article). In this case, it will be able to install silently.
|
|
|
|
|
I'm confused as to why you'd need to do this. Isn't it sufficient just to be able to download and install from the Microsoft site, especially as this introduces an effective lifetime for your article - what happens when SL5 is released (are you going to update your article)?
|
|
|
|
|
Hi Pete,
Actually I am writing one article on "Silverlight OOB Application Installation from CD-ROM". I want to add support for Silverlight version checking and the installation of it too. Hence, my article will not be depended on Silverlight version. Sorry, as I didn't inform you the actual context for my R&D.
|
|
|
|
|
Okay - I look forward to seeing that article then. Sounds interesting.
|
|
|
|
|
Pete O'Hanlon wrote: Okay - I look forward to seeing that article then. Sounds interesting.
I like the concept.
He can expect a +5 from me already (if everything works ).
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Abhinav S wrote: He can expect a +5 from me already (if everything works ).
Me too.
|
|
|
|
|
|
A good article indeed.
You are getting very good at this.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|