|
If it's vista, I think you can programatically check the index that Vista has for how fast your computer is, how good your card is, etc. Otherwise, I'd expect you could look into writing DirectX code that checks if aspects of DX are available, that's what we're talking about, after all.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
WPF uses DirectX/Direct3D, so I reckon if you can run a WPF app,
you can use WPF animation.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Is there a way to use excel spreadsheet ***as a datagrid*** in a WPF client-server application?
I know i can use WindowsFormsHost control in a WPF client application to host a winforms WebBrowser control, however this is really not a straight forward way of doing it.
I was wondering if you would know any other way of using excel spreadsheet ***as a datagrid*** in WPF client?
|
|
|
|
|
Hi,
I am working with a Media elememt in my application. In this I need to assign source to Media element dynamically. For I tryed with the below code. I am not getting any error but the video is displaying.
VideoControl.Source = new Uri(@"F:\Backup090909\AdRotator\Butterfly.wmv", UriKind.Absolute);
VideoControl.AutoPlay = true;
If anyone have any idea to solve this please reply me.
Thanks in Advance.
|
|
|
|
|
You can't use FILE:// URIs from a Silverlight application because
Silverlight applications don't have direct access to local drives.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi guys!
Experiencing something weird recently.
Due to the fact, that my observable collection is the datacontext of my wpf app,
I need to make sure, that every Thread is able to add Elements.
Now the easy and working way is to add a
Dispatcher.Invoke(new Action(()=>{collection.Add(element})); from every method being allowed to do so, which is kind of annoying.
So I thought it would be a good idea to add the functionality to the observable collection itself.
This is what I came up with:
class MElementsCollection :ObservableCollection<MElement>
{
#region Variables
private Dispatcher mainDipatcher;
public Dispatcher MainDipatcher
{
get {
if (mainDipatcher == null)
mainDipatcher = App.MainDispatcher;
return mainDipatcher;
}
}
#endregion
public void AddThreadSafe(MElement mElement)
{
if (Thread.CurrentThread != MainDipatcher.Thread)
{
MainDipatcher.Invoke(new Action(() =>
{
this.Add(mElement);
}));
}
else
this.Add(mElement);
}
}
Now what's actually happening is, that by adding many items short one after another, not every item is added to the collection but just for example every second one.
Can anyone please help me with this?
As always,
Thank you in advance
|
|
|
|
|
Why not take a look at Tamir's implementation here[^]? There's no need to reinvent the wheel here.
"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
|
|
|
|
|
|
Hi,
I am working on a silver light application. In this I need to upload videos, save them in afolder and retrieve them back to display. In this I need to save the uploaded video in a folder for retrieving later.
I came across some applications where the video is converted to bytes and saved in database and retrieved from there. But as i want the video to be saved in a folder I need to convert the byte[] in to video in a service and save itin my application folder.
If any one have any idea to directly save the slected file in the openfiledialog to a folder or to convert byte[]to video and save it in a folder, please rply me.
Thanks in advance
|
|
|
|
|
Hi,
I am working on a silverlight application in which I need to upload and display videos. These uploaded videos should be saved in a folder and from this folder I need to retrieve the videos and display them in my silverlight application.
If you have any idea to solve this please reply me.
Thanks in advance.
|
|
|
|
|
What part of this are you having problems with?
The System.IO Namespace[^] should have everything you need
to work with directories and files.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I've been learning c# for about 2 months now and have already made some pretty useful winform applications. With that said I feel that I have a decent understanding of c# although there is still plenty to learn. I'm at the point now where I find myself wanting to experiment with custom controls. At this point I'm not sure if I should continue to learn WinForm's or shift my focus on WPF as it seems to be the emerging tech.
Any advice would be great.
Thanks!
|
|
|
|
|
WPF is gaining foothold, I suspect more and more apps will use winforms in the future. Have you learned proper C#, things like different container classes, how to handle objects that are IDisposable, etc ? If not, I'd stick to winforms while learning the language a little better. Then I'd look into WPF.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: WPF is gaining foothold, I suspect more and more apps will use winforms WPF in the future.
I think that's what Christian meant to say
|
|
|
|
|
i totally think you shoud turn to the WPF,as we know,some parts of the VS2010 is designed by WPF,so i think the microsoft will think highly of the WPF,and wo know the route MFC->WinForms->WPF.so we shoud learn the new tech~
sorry,my english is poor --!
|
|
|
|
|
thanks for the feed back I've already stared investigating WPF, pretty interesting so far. I'm using VS10 beta and it seems much better than express edition. I think I'm going to bite the bullet and purchase the standard edition when it come out.
|
|
|
|
|
WinForm will be replaced by WPF sooner or later. WPF is suitable for programing under Win7 or Vista OS.
|
|
|
|
|
So are WinForms - you need to define the reasons where WPF is superior to WinForms in order to convince people to use it.
"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
|
|
|
|
|
You mean other than just because WPF is
Pete O'Hanlon wrote: a veritable porn star
?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
Hi,
I am developing a WPF UI application .
I have a menu on top of the screen, which has File, Help menuitems.
In file -> Backend features (shortcut key is ctrl + B), Exit (Ctrl + x) sub menu items.
when clicked on any sub menu item, the corresponding window opens.
So, with out using mouse, by pressing ctrl + B or Ctrl + x, how can the window be opened??
Also, how can I display a small line below the "F" in the File so that when user presses Alt + F, the File menu should be visible.
I am working on WPF using C#.
Please guide me.
Thanks
Ramm
|
|
|
|
|
I would just handle the key press event, I'm not sure how to do shortcuts in WPF on the menu, if autocomplete and MSDN doesn't tell you, just handle the keypress directly
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Try something like this,
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Header="Exit" InputGestureText="Ctrl+X">
</MenuItem>
</MenuItem>
</Menu>
And look at this[^] and this[^] for the CommandBinding option
|
|
|
|
|
Is there a property or style for the selection color? I use the VS2008.
|
|
|
|
|
Coming soon to WPF 4.0: Selection Brush[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
m getting following error while accessing data from SQL server 2005 in my Silverlight application. m using Silverlight enabled web service class and Linq to sql for data access. Can someone suggest me whats going wrong. Thanks in advance.
System.ServiceModel.CommunicationException was unhandled by user code
Message="The remote server returned an error: NotFound."
StackTrace:
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at SLApp9.DataServiceReference.DataService1Client.DataService1ClientChannel.EndGetCusUserID(IAsyncResult result)
at SLApp9.DataServiceReference.DataService1Client.SLApp9.DataServiceReference.DataService1.EndGetCusUserID(IAsyncResult result)
at SLApp9.DataServiceReference.DataService1Client.OnEndGetCusUserID(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
InnerException: System.Net.WebException
Message="The remote server returned an error: NotFound."
StackTrace:
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
InnerException: System.Net.WebException
Message="The remote server returned an error: NotFound."
StackTrace:
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
InnerException:
|
|
|
|