|
thanx for your reply!
actually in my initial post I mentioned that I do not like the Navigation example on msdn because it looks so weblike...but well I thought I might google for it a bit more and see if I could find any better examples (I am not fond of the msdn examples, they are small and do their job but most of the coding is bad).
I found out it is possible to restyle the frame/page system so that it looks less weblike and more like a decent software wizard. Maybe it's not that bad after all.
I'll give it another try!
sth_Weird
|
|
|
|
|
Hi, in the mean time I am responding you.
I was suggested you, to use NavigationService using Frame with windows. This will not behaving like browser application.
After 1 or 2 hours I will post you sample code.
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
thank you very much for your help!
it is very kind of you to offer me sample code, but since I want to dive deeper into wpf and not just "copy, paste (and edit)" I will try to implement it on my own (I am experienced in c# and I know the basics of wpf, so I hope this won't be too much of a problem for me). I will return if I encounter problems!
sth_Weird
|
|
|
|
|
No problem. I like your sprit towards the WPF. Thanks
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Have you worked with any of the commercially available wizards? It might give you an insight as to how it is actually structured.
I've only used the Actipro wizard which is pretty good. Might be worth going down this route to kick off some thought processes.
Cheers,
|
|
|
|
|
Thank you for your answer.
I've heard about the Actipro wizard but I don't want to use any commercial products (it says on the homepage it's only a trial, and the included source code shows how to use the wizard but it does not include the source code of the wizard itself).
EDIT: I think I'll give the navigation approach (frame/pages) another try, I've found a couple of useful examples of how to restyle it an make it look less weblike. Maybe it's not that bad after all.
sth_Weird
|
|
|
|
|
|
I have created a wcf services that are hosted in console application,and binding is done using netNamedPipeBinding. Now i am adding this service as a service refernces in silverlight .web part.
How can i use it to display data. Here wcf services uses database.
please put ur valuable comments
Thanks in Advance
|
|
|
|
|
If you succeeded in getting a service reference then you are halfway there.
Let's say you saved that reference as MyWcfService. That name becomes your namespace extension. So if your project is MyWeb, then your full service namespace is MyWeb.MyWcfService.
In your program you now have to find the name of your DataClient. After that the rest is a piece of cake.
MasterClient client = new MasterClient();
client.OpenAsync();
client.GetInformationEventHandler+=new EventHandler(ProcessResults);
client.GetInformation();
client.CloseAsync();
The event handler sets the CallBack from the asynchronous call.
The GetInformationI() call is actually whatever your calls are in your service. (event handlers are automatically generated for you)
You can make multiple calls to multiple methods on the same instance of the client. But if you have to make two calls to the same method, you need two separate instances of the client and two instances of the event handler. (such as loading the customer address and billing address)
|
|
|
|
|
I have created WCf services in console Application in C#. How can i use this services in silverlight .web part.using this services i have to display data.
|
|
|
|
|
You have already posted this question here.
Please do not repost....
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
I wish to bind 'Canvas.Left' of an ellipse to a property (iEllipse) of Class instance(bClass). This property gets updated from several locations. Following is the C# code:
namespace BindingTest
{
public class BindingClass
{
public int iEllipseLeft { get; set; }
public BindingClass()
{
iEllipseLeft = 30;
}
}
public partial class Window1 : Window
{
BindingClass bClass;
public Window1()
{
InitializeComponent();
bClass = new BindingClass();
}
private void updateLoc()
{
Random random = new Random();
bClass.iEllipseLeft = random.Next(0, 100);
}
}
}
And, this is the ellipse I want to bind. Basically I want to move this ellipse whenever bClass.iEllipseLeft gets changed.
<Canvas Margin="16,128,244,52" Background="#FFE8E8E8">
<Ellipse Fill="#FFFE0C0C" Width="32" Height="32" Canvas.Left= "5" Canvas.Top="48"/>
</Canvas>
Whether it is possible by writing '{Binding=..}' in .XAML or by coding in .cs file, please let me know. I'll be happy in either way. It might be a very simple question, but I've just started using WPF and C#, so please help
|
|
|
|
|
Hi
Try declaring EllipseLeft as a DependencyProperty. Below is a sample code
public static DependencyProperty EllipseLeftProperty = DependencyProperty.Register("EllipseLeft", typeof(int), typeof(Window1));
public int EllipseLeft
{
get { return (int)GetValue(EllipseLeftProperty); }
set { SetValue(EllipseLeftProperty, value); }
}
Than you can set up the binding in the xaml.
I hope this helps
Uros
|
|
|
|
|
Got the answer. Thanks koleraba! Just adding few bits and adjustments to your code to make it run.
Inside class, we need to define property something like this:
public class BindingClass : DependencyObject
{
public static DependencyProperty EllipseLeftProperty = DependencyProperty.Register("iEllipseLeft", typeof(int), typeof(BindingClass));
public int iEllipseLeft
{
get { return (int)GetValue(EllipseLeftProperty); }
set { SetValue(EllipseLeftProperty, value); }
}
}
Also in starting, we need to set data context of the object/canvas or Window:
BindingClass bClass = new BindingClass();
objEllipse.DataContext = bClass;
And, in .xaml file:
in stead of
<Ellipse Fill="#FFFE0C0C" Width="32" Height="32" Canvas.Left= "5" Canvas.Top="48"/>
write
<Ellipse Fill="#FFFE0C0C" Width="32" Height="32" Canvas.Left= "{Binding Path=iEllipseLeft}" Canvas.Top="48"/>
That completes the binding!!
|
|
|
|
|
I have just installed Silverlight 4 and all that other stuff from Microsoft because I wanted to use this technology on my web building, but I have never programmed in C#, Silverlight, .Net... I am used to html and css basics. Mainly building with Dreamweaver. (I want to expand my horizons) Now that I have have Silverlight, I am thinking of a website.
This website will be a carousel with 5 pictures of differnt pages from the site. Just needs a left/right control, each pic is a link to their repective pages, and I would be using a picture for the background.
If anyone can help me with this, I would truely appreciate it..
P.S. I have done a lot of research on many other sites, but they all have controls, needed assemblies.. Stuff I don't know about or don't know how to modify to my needs.
I need someone who can help me thru the process.
|
|
|
|
|
|
If you are a beginner, you should have a look at the two videos posted here.
|
|
|
|
|
I have seen those 2 pages, and it is way off of what I would like, and I don't have the knowledge to modify what he does...
And the other poster: While his work looks real nice, and is similar to what I want, his tutorial is just above my comprehension...
*sigh...
It might be no use to me anyhow as GoDaddy has a problem with Silverlight working under IIS 7, contrary to what they post.. And some of the fix arounds have been no help because they too are confusing and GoDaddy doesn't have the proper GUI controls.
|
|
|
|
|
Hi All,
I wondered if someone could help me, to add additional parameters to a Style.
I've currently got a ContentControl, which has obviously has a "Background", "BorderBrush", "Foreground" & "Opacity Mask" brushes in the Properties tab. And I would like to specify additional brushes, that are contained within the Style.
The reason I want some additional brushes, is to define some Gradient Brushes. That I am using as an overlay for some of the components/parts of my inherited Control.
I can't seem to find anything on the web, but maybe I'm not looking in the right places!
One last thing, I'm a designer not a developer. - So presume I'm stupid to save time!!! ha ha
Thanks in advance!
Alan
|
|
|
|
|
What you could do is to bind your color to a property of your datacontext - something like -
<textbox x:name="MyTextBox" text="Text" foreground="{Binding Brush1, Mode=OneWay}">
You can then set your color through the code.
You could probably talk to a developer to see if this approach is useful to you.
|
|
|
|
|
Thanks, but I obviously did not make it clear:
I want to see this new brush, in the brushes section of the Properties tab of Expression Blend.
Something like this:
http://www.infragistics.com/uploadedImages/VDG/Blend_custom_brushes.jpg
Thanks anyway.
modified on Monday, March 22, 2010 1:33 PM
|
|
|
|
|
Not sure, but maybe this[^] video may be of some help to you.
|
|
|
|
|
Thanks, but that still does not address or answer my question.
|
|
|
|
|
Hi Alan, you have probably figured this out by now. I haven't used Blend much but I think what you are looking for is that once you define your brush in Blend under properties, you can then click that tiny square 'advanced property options' and select 'Convert to new resource' which will then give you options where you want to place the brush. You will then have your new brush available under 'Brush Resources'.
|
|
|
|
|
Hi Katka,
Thanks for having a look at this, but it's a coding issue. (I am 99.99% sure!)
I actually wanted this for my Picture Frame tutorial[^] to make it a bit funkier. And the reason is best explained there. I did drop a few hints, but no developer has taken the bait yet!
Cheers,
Alan
|
|
|
|