|
Now you're just talking crazy...
"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
|
|
|
|
|
Christian Graus wrote: That would make sense, right ?
No. You don't define namespaces in XAML.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am right in thinking you are refering to defining a namespace for e.g. a bunch of controls, and you wish to reference those controls in xaml using a (Xml) namespace rather than by code namespace and assembly, as in the example below (controls vs scm)
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:controls="http://schemas.xxx.com/wpf/xaml/controls">
To create your own (xml) namespace defintion, just done something like the following in you AssemblyInfo file
[assembly: XmlnsDefinition("http://schemas.xxx.com/wpf/xaml/controls", "xxx.Common.Controls")]
[assembly: XmlnsPrefix("http://schemas.xxx.com/wpf/xaml/controls", "controls")]
You can then use the xmlns definition in any xaml files that reference your controls project, but unfortunately, you can not use the xmlns defintition withn the project, eg. in a Resource dictionary within the project, which is understandable, but disappointing.
|
|
|
|
|
I have to write an web browser application in WPF having database. I want to know if there are good sample database applications. I am looking for something like the sample on Microsoft SQL. I need all the basic functionality expected on line of business applications like master/detail or at least a similar functionality. Someone could please help me!
|
|
|
|
|
A SQL database isn't implimented any differently in WPF, compared to a winforms app. I need to know tho, why does your 'web browser application' need a database ?
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
|
|
|
|
|
Christian Graus wrote: I need to know tho, why does your 'web browser application' need a database ?
So he can properly catalog his inabilities.
"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
|
|
|
|
|
i need database because i want to store data from user and show the data to the user on demand
|
|
|
|
|
What data ? Why ?
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
|
|
|
|
|
I have problem that the database created in WPF web browser application cant open.It provides an error.
The following code is written in the page2.xaml.vb under the event button1_click of button1
imports system.data
imports syste.data.sqlclient
dim sqlconnection1 as new sqlconnection(my.settings.database1connectionstring)
dim dr as sqldatareader
dim sqlcommand1 as sqlcommand
try
sqlconnection1.open()
sqlcommand1=new sqlcommand("select FirstName from Table1",sqlconnection1)
dr=sqlcommand1.executereader()
while dr.read()
combobox1.items.add(dr(0))
end while
dr.close()
catch ex as exception
msgbox ex.message
end try
sqlconnection1.close()
THE ABOVE CODE GENRATE THE FOLLOWING ERROR AT RUNTIME
REQUEST FOR THE PERMISSION OF TYPE 'system.sqlclient.sqlclientpermission,system.data,version=2.0.0.0,culture=neutral,publickeytoken=b77a5c561394e089 failed.
please tell me what should i do.
thanks in advance......
|
|
|
|
|
Try here[^]
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
|
|
|
|
|
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.
|
|
|
|