|
katelva wrote: I would like to ask anyone have any ideas how to create own set of tool palette such as pen tool,brushes using Silverlight?
You mean, you want to create your own pen tool or brushes in Silverlight? Why? Silverlight already have path and brushes so why don't you use them?
|
|
|
|
|
Do you mean I can use the path in Silverlight? Can you teach me how to access the path and brushes of silverlight? Coz I would like to create something like paint application online? When user clicks on the pen tool, then the user can draw online?
Thanks
Regards,
Katelva
|
|
|
|
|
katelva wrote: I would like to create something like paint application online? When user clicks on the pen tool, then the user can draw online?
Yes. Actually, there are one online application for that. Please take a look at SilverInk[^] and tutorial[^]
I think you are very new to Silverlight. Otherwise, you won't ask how to use the path and brushes in Silverlight.
Please take a look at Silverlight Quick Start[^]. You can learn how to use Silverlight from that page. then, you can focus on how to drag and drop in Silverlight. after that, you will be able to create Silverlight paint.
|
|
|
|
|
Hi All,
Just need a couple of pointers as to why something isn't working ...
Say I have a textbox on my WPF 'form' thus:
<TextBox x:Name="EnabledTextBox" Style="{DynamicResource TextBox.Default}" ToolTip="TextBox" Text="Hello World!" TextWrapping="NoWrap" Margin="4,4,4,4" IsEnabled="True"/>
Then in my code I'm walking the visual tree and grabbing various bits of information like:
if (obj.ReadLocalValue(NameProperty) != DependencyProperty.UnsetValue)
{
_elementName = obj.ReadLocalValue(NameProperty).ToString();
}
this results in _elementName being "EnabledTextBox" ... great all good. But when I do the same for the Style:
if (obj.ReadLocalValue(StyleProperty).ToString() != null)
{
_styleProperty = obj.ReadLocalValue(StyleProperty).ToString();
}
Style always results in "System.Windows.ResourceReferenceExpression" I've been looking through the object explorer windows on a breakpoint. How do I drill down further to get the bound style ResourceKey ...
hmm ...
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Hi All,
I've been going round in circles on this now for nearly two days ... I've exhausted my ideas completely. Any help with this would be great.
Thanks,
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
obj.GetValue(StyleProperty) returns a style, if you use a StaticResource your method works.
MSDN says
You should use GetValue for most typical "get" operations for a dependency property. ReadLocalValue does not return the effective value for a variety of circumstances where the value was not locally set.
Values that are set by styles, themes, templates, the default value from metadata, or property value inheritance are not considered to be local values. However, bindings and other expressions are considered to be local values, after they have been evaluated.
Mole is a lot more useful that the watch/locals window for WPF.
|
|
|
|
|
Hi Dave,
Indeed ... my method returns a string of System.Windows.Style ...
My style is set as Style="{DynamicResource TextBox.Default}" even looking through the visual tree using Mole/Woodstock doesn't get the value I'm interested in!!!
Mole shows a null reference and Woodstock has an empty box for the Style property. Yet when I hover over my obj and walk around the debug popups I can find "TextBox.Default" in the list of effective values ...
If Mole and Wodstock can't get at these values it makes me wonder if its even possible ...
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
What is the value you are after?
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<Style x:Key="TextBox.Default" TargetType="{x:Type TextBox}">
<Setter Property="FontFamily" Value="Century Gothic"/>
<Setter Property="FontSize" Value="40" />
</Style>
</Window.Resources>
<Grid>
<TextBox x:Name="EnabledTextBox" Style="{DynamicResource TextBox.Default}" ToolTip="TextBox" Text="Hello World!" TextWrapping="NoWrap" Margin="4,4,4,4" IsEnabled="True"/>
</Grid>
</Window>
var value = EnabledTextBox.GetValue(StyleProperty) as Style;
if (value != null)
{
foreach(Setter s in value.Setters)
{
Console.WriteLine(s.Property + " = " + s.Value);
}
}
Outputs
FontFamily = Century Gothic
FontSize = 40
|
|
|
|
|
I'm actually after all the properties of any given control. So that would start at TextBox.Default and then a tree of all the colours and property values for that instance of TextBox.
So I guess your code is going to be very useful, thanks for that. I also need to grab the actual name of the style that has been applied to the control at run time.
maybe this?
var value = EnabledTextBox.GetValue(StyleProperty) as Style;
if (value != null)
{
_styleName = value.ResourceKey
}
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
I made a project in which i have to use web camera.
I have to make a Interview process in asp.net2.0.
i don't know how to configure or code web camera in asp.net.
It means i want to make a interview process in which both side have a web camera, both can see the live movement from both side.
how it is possible????
please help me.....
|
|
|
|
|
You won't be able to access the user's microphone or webcam from Silverlight application.. So, what you can do is that you can upload a few pieces of video to server and steam it from Silverlight...
but if you are asking ASP.NET question, you can post it here[^]
|
|
|
|
|
|
Hi All,
I was using mx.messaging.MessageAgent package for developing Actionscript3. Now i want to convert project into SilverLight so i want to know which is alternative namespace or Class is available in .Net Silverlight.
Regards
Atul
|
|
|
|
|
Atul23 wrote: I was using mx.messaging.MessageAgent package for developing Actionscript3.
I already replied you in your previous message. What does that namespace do?
|
|
|
|
|
Hi All,
I was using following packages/namespaces in Flash project using ActionsScript3 language.
import mx.messaging.Consumer;
import mx.messaging.MessageAgent;
import mx.messaging.Producer;
import mx.rpc.AbstractService;
import mx.rpc.http.HTTPService;
import mx.rpc.remoting.RemoteObject;
import mx.rpc.soap.WebService;
Now i want to covert my project in to Microsoft Silverlight. Can anybody suggest me which are the alternatives namespaces available in .Net Framework class library for Silverlight.
Thanks in Advance
Atul
|
|
|
|
|
Hello Atul,
The most of here are not familiar with ActionScript or Flash. So, we are not so sure about those namespace.. What you can do is that you can tell us what you want to do. We may probably suggest you something..
|
|
|
|
|
How to create a TreeViewItem outside the main thread?
I use BeignInvoke called from the main thread to add it to a TreeView , but for performance issues I want to use more threads in multiple-core machines for creating TreeView items (loading their content may take some time).
Any help appreciated.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
Can I suggest that you read this[^] article?
|
|
|
|
|
The setting:
In my application I have a viewing area:
<Border x:Name="contentArea" BorderBrush="Black" BorderThickness="1" Margin="10" />
And, triggered by user action I get passed XAML fragment to put in, such as:
<wpf:ControlTemplate>
<wpf:Frame Source="http://music.controlability.com.au/player"/>
</wpf:ControlTemplate>
then I call LoadContent() on these ControlTemplate (which, in this particular case, create a frame loading a flash music player)
then I set
UIElement ui = GetUI(item);
contentArea.Child = ui;
where item is the XAML fragment originated ControlTemplate and contentArea is the border previously mentioned.
(and GetUI() just call FrameworkTemplate.LoadContent())
The problem:
Now I expect the content to be garbage collected when replaced by another content. Indeed it works quite well with my own objects.
Now the problem is with this Frame with a Flash music player, it doesn't get collected when it's removed from the UI and the music keeps playing!
What can I do?
I have no reference to it, I have no event registered with it, I don't even know it's a frame, as far as I know it's just a ControlTemplate!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Iam trying to develop a Treeview where the user can only view childnodes of a node only one at a time. eg. Suppose the user clicks on Node 1 its childnodes shall be visible, the moment he clicks on Node2, only Node2's child nodes shall be visible, Node1's childnodes would have collapsed. My questions are ;
i) Is it possible to do so using only XAML (No code in VB to be written)
ii)If possible where could I get articles/guidelines/manuals etc. on this subject.
Best Wishes ....... ARIJIT
|
|
|
|
|
How i can start with silverlight? Very Basic .....
|
|
|
|
|
|
Assalam-o-Alaikum Zeshan.
First of all make a literary survey that
What is silverlight?
Why should you use it?
Features?
Comparison with other technologies.
Then there is a link http://silverlight.net/default.aspx
Install Microsoft expression blend there u van find some help.
I hope that you have got some idea.
Take care.
|
|
|
|
|
Hi! I have written the following text in my WPF application. But it is not working. When I click on the hyperlink nothing happens.
<Hyperlink NavigateUri="http://www.yahoo.com">
<Span Foreground="#FF0000FF" TextDecorations="Underline">
<Run Text="Yahoo"/></Span>
</Hyperlink>
Is any other way to give links on text. Actually I want to link folders and files of harddisk with my application not websites.
|
|
|
|
|
You need to handle the Click event and navigate to the URL.
I use the below function. strFileName can be a file name, or URL and the O/S will navigate the user to the web page.
Public Class UtilityHelpers
#Region " Methods "
Public Shared Sub StartProcessWithFileName(ByVal strFileName As String)
'Start a process : http://dotnet.mvps.org/dotnet/faqs/?id=openfileappwebpage&lang=en
Dim psi As New System.Diagnostics.ProcessStartInfo
psi.FileName = strFileName
psi.UseShellExecute = True
System.Diagnostics.Process.Start(psi)
End Sub
#End Region
modified 27-Feb-21 21:01pm.
|
|
|
|