|
Hello!
I am developing a program. sometimes, i need to view something in a WebBrowser (using WindowsFormsHost or Awesomium)
I want to glass somewhere of my window (in webbrowser)
in winForms, I can make it black and it will glass inside browser (i think), but in WPF, I can't set a color inside webbrowser in black.
So, How do I glass something in WebBrowser (using WindowsFormsHost or Awesomium) in WPF?
Regards.
Mehdi Ghiasi
|
|
|
|
|
A cruel suggestion will be to add a border control on top of your web browser and set the background value to black with opacity of about 60%. You will have to control the visibility of this border control from code.
|
|
|
|
|
Hello,
Some time ago, my Visual Studio 2010 for some bizar reason would never be able to have IntelliSense find my 'LayoutRoot' in my Page1.xaml.cs file. Now recently, I looked at my .xaml file and removed some tags and now LayoutRoot shows up magically for some reason.
Could it be that 'LayoutRoot' won't show unless I have valid xaml? I remember that my prof told me it was my own responsibility for my machine working, and during the whole exam I couldn't get that darned 'LayoutRoot' to popup in IntelliSense.
I would like to know exactly what happened in my VisualStudio that made the LayoutRoot pop up again and what would prevent it from popping up.
Thank you
//Edit: I fixed it. My .xaml page had to have its 'Build Action' property set to 'Page' and not 'ApplicationDefinition'.
modified on Monday, July 11, 2011 6:37 AM
|
|
|
|
|
hello guys... I wanna know that whats the difference between the ADO.NET we use in silverlight and the one we use in Windows(Web) applications? How do they differ in usage (strategy), why dont we just use the simple ADO.NET of windows apps? Why we need a different machanism?
|
|
|
|
|
Well you don't use ADO in Silverlight, you can't the whole data assembly is excluded from SL assemblies. You have to supply the data via WCF. In the WFC you use ado.net just the same as the winforms, you just can't send a datatable/set to the Silverlight client. You need to serialise it, we use List<object> proxies.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
In addition to the other reply...
Silverlight apps run on the client in a browser, and except in certain circumstances, run with restricted privileges, making direct access to databases impossible.
As mentioned, ADO.NET should be used on the server, and the Silverlight client can use something like WCF[^] or WCF RIA Services[^] to transfer data to/from the server.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Well there is no ADO.Net in Silverlight.
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.
|
|
|
|
|
ObservableCollection is binded to ItemsControl and PropertyChange fired on CultureChangedEvent though the items in collection remains the same. This doesnot update the DataTemplate/ItemTemplate. I guess WPF ignores because no change made to the item collection. How do i force a refresh on DataTemplate? i had tried BindingExpression.UpdateTarget().
similar problem is addressed at this Link[^] but the recommended approach didn't work.
any idea?
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Have you tried raising a Reset notification on the collection?
|
|
|
|
|
Calculation of value of DependencyProperty[^]
1.Local value
2.Style triggers
3.Template triggers
4.Style setters
5.Theme style triggers
6.Theme style setters
7.Property value inheritance
8.Default value
Question is, what's difference between "Style trigger" and "Style setters"?
For example, below is "Style trigger"
<Button.Style>
<Style TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="Blue"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
OK
</Button>
I presume "Style setters" simply means:
<Window.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="FontFamily" Value="Times New Roman" />
<Setter Property="FontSize" Value="30" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="#FFCA5132" />
</Style>
</Window.Resources>
From the reference [^]it says:
"Local value technically means any call to DependencyObject.SetValue, but this is typically seen with a simple property assignment in XAML or procedural code"
So by "Local Value", it means a simple assignment such as:
<Button Foreground="Blue" />
Am I right?
http://www.bobpowell.net/dependencyproperty.aspx[^]
dev
modified on Thursday, July 7, 2011 6:02 AM
|
|
|
|
|
A trigger has conditions and setters. When the conditions are met, the setters are applied. A standalone setter always applies.
|
|
|
|
|
I know there could be restriction for Silverlight application to access local file system and resources. Is it possible for a browser based silver light application made full trustable at client local machine by doing some settings in client machine?
|
|
|
|
|
No. In order to access the client-side file system, the app has to be run "out-of-browser", and even then, you're restricted to saving/retrieving files in a special folder.
EDIT ================
Why was this 1-voted? It's the correct answer.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "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
modified on Friday, July 8, 2011 11:56 AM
|
|
|
|
|
No
If you rephrase that as can I make some settings on my local machine that will allow a browser based application to do anyhting to my hard drive and therefore take over my machine. You can make a file open/save operation only and only if it is initiated by the user. Oh and it must be the first operation after the event is raised!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have a user control which is created in Silverlight. Can I include the same user control in WPF?
Please reply.
|
|
|
|
|
You can, but only inside a web browser instance running inside the WPF application.
|
|
|
|
|
"but only inside a web browser instance running inside the WPF application" means?
|
|
|
|
|
Sorry, I was trying to be as precise there as possible to remove any ambiguity. It basically means that you need to host a web browser control inside your WPF application, and the Silverlight control will have to be displayed in there.
|
|
|
|
|
Thank you for your reply.
Are you saying that we need to host a webbrowser control inside our WPF application and programatically load the Silverlight control at runtime?
|
|
|
|
|
Yes you need to host a webbrowser control in your WPF application. No, you don't programatically load the Silverlight control - it's a web control, so you should have a web page that hosts the control already. The web browser navigates to this web page and displays it.
The alternative is to create a WPF version of the control.
|
|
|
|
|
Thank you so much for your reply.
|
|
|
|
|
|
I suggest you use Awesomium[^] instead of Including a web browser in WindowsFormsHost
Regards.
Mehdi Ghiasi
|
|
|
|
|
Why would I want to use Awesomium. I'm not the poster, and he doesn't get notified of replies to other people. By the way, Awesomium might not be free depending on his compliance with the license, so the OP might not want to have to splash out on it.
|
|
|
|
|
Actually, why bother[^] try to understand Visual/Logical tree...?
I've been coding WPF for two years now still feel hazy...
I know DependencyProperty propagates down the logical tree and can do TwoWay DataBinding which CLR property cannot do and similar can be said of RoutedEvent. I know Resource resolution goes up/down Logical tree as supposed to visual.
But I don't see any "Application" as WPF developer (as supposed to WPF Framework developer working in Redmond) to understand how it works...
Anyone, please enlighten me... not sure why I need to know [^]unless I'm writing a parser to parse XAML
dev
|
|
|
|