|
OHHHH ,, YYYYYAAAAA
I have done It.
Now I am Able to connect the database in WPF web browser application
Thanks to all of them who helps me
|
|
|
|
|
Hi,
In my Silverlight Apps, I m unable to drag and drop 'Silverlight XAML controls' on the page.xaml surface. I could add the same by typing XAML markups. Whats the problem? I m using Visual Studio 2008 with VS 2008 SP1.
modified on Friday, June 19, 2009 4:13 AM
|
|
|
|
|
The Visual Studio Silverlight XAML editor's GUI pane is currently only a preview window.
There's no editing features there.
VS 2010 will have it.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I'm trying to write a Winforms Application, in which one Windows has the sole purpose to host a WPF Control.
The window itself is transparent (using the TransparencyKey-Property) and so are parts of the hosted WPF control(Using Background-Color=Transparent).
The ElementHost has its BackColorTransparent property set to true.
Problem is: The transparent areas of the WPF control are painted in the background color of the winforms-host. The one that should be replaced by transparency (because of the TransparencyKey).
Seems like an airspace-problem to me, but I'm not sure about that.
How can i achieve true transparency (so i can see the underlying desktop through my WPF Control)?
Any help would be appreciated.
Michael.
|
|
|
|
|
I've never actually done it, but I don't see any reason you couldn't just have a WPF window and create and launch it from your Winforms Form. Then you don't have to worry about airspace and interop problems.
|
|
|
|
|
Simple, but did it - didn't thought of it, because Visual Studio won't let you add one in a Winforms-project.
Thanks.
|
|
|
|
|
I generate all my 3D models in the code-behind file. What I want to know is, is it possible to assign names to the ModelVisual3D's as I create them?
In the XAML I could just use x:Name, but as I said, the models are created in the code-behind.
|
|
|
|
|
Have you tried setting the Name property?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
There is no such thing as a Name property for either a ModelVisual3D or a Model3DGroup when using it in the code-behind. It's the first thing I tried
|
|
|
|
|
There isn't an x:Name property?
|
|
|
|
|
x:Name is a dependency property - hence, you can set it in code using SetValue(this3DObject, "ObjectName"); (and use GetValue("ObjectName") as ModelVisual3D; to retrieve 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
|
|
|
|
|
I tried your code, but I'm not quite sure how to implement it. I'm very new to WPF. Let me give you a sample of the code I'm using. I use an array of ModelVisual3D's called mv3dCube, each array index holding a cube.
So each time I add a new cube I set the Content property of the ModelVisual3D to an item in a Model3DGroup array as follows:
mv3DCube[index].Content = mdl3DGrpCube[index];
But before I set the Content property, I want to assign name to the ModelVisual3D.
Can you please show me exactly how I would implement this using my code.
I tried something like the following:
mv3DCube[index].SetValue(this.mv3DCube[index], "someName") but it still gives me an error
|
|
|
|
|
I got it working.
I used ModelVisual3D.SetValue(FrameworkElement.NameProperty, "someName") and ModelVisual3D.GetValue(FrameworkElement.NameProperty)
Thanks guys
|
|
|
|
|
I can't get it working. I'd like to set/get a name from a dynamically loaded xaml file.
When I save the Viewport3D with this method, the name of the Viewport (specified in xaml) is written, but the name of my model isn't. Anyone has a solution?
using (FileStream stream = new FileStream("text.xaml", FileMode.Create, FileAccess.Write))
{
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.ConformanceLevel = ConformanceLevel.Auto;
XmlWriter writer = XmlWriter.Create(stream, settings);
XamlDesignerSerializationManager manager = new XamlDesignerSerializationManager(writer);
manager.XamlWriterMode = XamlWriterMode.Expression;
XamlWriter.Save(Viewport, manager);
}
-----------------
ModelVisual3D model = new ModelVisual3D();
model.Content = new GeometryModel3D(MeshPrimitives.Box(10, 10, 10), new DiffuseMaterial(new SolidColorBrush(Colors.Red)));
model.Transform = new TranslateTransform3D(new Vector3D(0, 20, 0));
model.SetValue(FrameworkElement.NameProperty, "SomeBox");
Viewport.Children.Add(model);
|
|
|
|
|
Your method won't work because you're setting the model's name programmatically in your code and not in the xaml. I think it will only write to xml whatever is explicitly defined in the xaml.
Can't you rather create this model as a resource in the xaml and then just reference that resource wherever you want to use it? That way you can give the resource a name and then this name should appear in the xml file.
|
|
|
|
|
You could try NameScope.RegisterName, looking at the docs there is also FrameworkElement.RegisterName but I'm not sure if either works with Visual3Ds.
|
|
|
|
|
Hello!
Imagine you have a view with his ViewModel. You have your commands created on that ViewModel and you can use it in the view using something like "{Binding MyCommand}". That is because the View's DataContext is the ViewModel.
But... Imagine now that you have a ItemsControl with a ObservableCollection of some class (like dog). You defined an ItemTemplate and inside, a DataTemplate. Well, every row is a dog item of that list. Now, you want a button in every row that delete that row. You have a command in the ViewModel that delete that dog but... How can you link the button with the command? The button datacontext is the Dog itself and not the ViewModel. You can't link to the command... Then, what is the correct solution to this kind of problem?
Thank you.
|
|
|
|
|
|
So i`ve found that it`s a bug in Windows XP.
Some people say that it`s needed to install 32-bit framework on 64-bit OS.Nonsense.Seems impossible.
So any other ways to make it play video?
|
|
|
|
|
Media Element will not work if WMP10 is not installed, have you checked that ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
C# WPF
I have this lines of code.
mediaElement.Source = new Uri(fileName, UriKind.Absolute);
mediaElement.Play();
Sometimes mediaElement plays the file (mp3 or video)... and sometimes will play that file after a while (3 minutes ++ like the file that just was played previously)
I tried that to put mediaElement.Stop(); or to stop the graph (like in directShow) but no results...
Please... please someone know why this lag?
|
|
|
|
|
How to create the WPF Web browser application, in which user can navigate through multiple pages?
|
|
|
|
|
As you're using WPF, you will need XAML, as well as some code.
Seriously, what have you tried ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Tell me how can i do that?
|
|
|
|
|
I assume you're joking ? What was the point of your original post ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|