|
Your requirement is not clear. Can you give more details
|
|
|
|
|
I need display an image while selcting an item from combobox....like
combobox1_selecttionchanged
{
image1.visibilty==true;///this one giving error
}
wht i hv to do to display an image
With Regards
Ch.Gayatri
|
|
|
|
|
If you are trying to change visibility of image control then,
image1.Visibility = Visibility.Visible;
But you can directly bind the image source from the XAML itself. You may need an IValueConvcerter for converting selected item to image source.
|
|
|
|
|
Hi,
I am wanting to create a Silverlight Navigation Windows 7 Theme Template but everytime I want to create this type of project on my Visual Studio I keep on getting an error saying:
Error: this template attempted to load component assembly Microsoft.VisualStudio.Silverlight,Version=10.0.0.0, Cultrual=Neutral, PublicKeyToken=b03f5f7f11d503a. For more information on this problem and how to enable this template, please see documentation on Customising Project Template.
The problem I have is to find where the documentation is.
Andrew
Andrew McIntyre
|
|
|
|
|
Hello everybody .
i am trying to make non rectangular window in wpf , using Rectangle with rounded corners
i have already done so , but the problem , i can't add controls on the window anymore .
i don't know why . here is the code .
<Window x:Class="TestingPOS.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TestingPOS.Controls"
x:Name="MainWindow"
Title="Window1" Height="600" Width="600" Background="Transparent" AllowsTransparency="True" WindowStyle="None" MouseLeftButtonDown="Window_MouseLeftButtonDown">
<Window.Template>
<ControlTemplate>
<Rectangle Stroke="Black" RadiusX="97.5" RadiusY="97.5" Canvas.Top="36">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</ControlTemplate>
</Window.Template>
</Window>
this code makes the window with rounded corners but i have made a user control login screen that i need to insert onto the window , the form doesn't accept any controls even like button or textbox
how can i do that task
Please help !
Human knowledge belongs to the world.
|
|
|
|
|
You need a ContentPresenter in your ControlTemplate and set the TargetType of the ControlTemplate too.
<Window.Template>
<ControlTemplate TargetType="{x:Type Window}">
<Grid>
<Rectangle Stroke="Black" RadiusX="97.5" RadiusY="97.5" >
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter />
</Grid>
</ControlTemplate>
</Window.Template>
|
|
|
|
|
I have a list
List<submissionworkflow> listSWF
that i bind to a datagrid and that works fine like this:
toolkit:DataGridTextColumn Binding="{Binding Title}" Header="Emne"
But the 'SubmissionWorkflow' object have a property 'Participants' that is a collection of objects of the type 'Participant' and when I try to bind like this
toolkit:DataGridTextColumn Binding="{Binding Path = /Participants[0].Name}" Header="Participants name"
Nothing happens.
What am I doing wrong?
|
|
|
|
|
Remove the slash from before Participants[0]. As a hint, always check the Output window when running your app if you are getting binding errors.
"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
|
|
|
|
|
Hi,
When you click on '?'(right top corner) button in a WPF window, how to associate *.chm file to it?
any idea?
thanks
|
|
|
|
|
Hi All,
I want to use some collabartive white board for my project in which users can chat and at the time 3-4 pople works on the same board etc.
I want open source white baord for that purpous so that I can modify code according to me .
If any can tell me which one is better to use.
Silverlight whiteboard or flash white board .Please detail me with reasons which technology is better for this purpous.
It will be of great help if any one can provide link to open source collabarative whiteboards.
Thanks
Nitish
|
|
|
|
|
See here.
My signature "sucks" today
|
|
|
|
|
While running my silverlight application ...at run time ,in IE browser i am not able to navigating the xmal pages becoz ,the BACK and FORWARD button of IE are disable.How to make then enable.
Thanks in advance,
With Regards
ch.Gayatri
|
|
|
|
|
Browser buttons are not used in Silverlight by default.
IN Silverlight 3, you can use the navigational framework[^].
My signature "sucks" today
|
|
|
|
|
Can u help me in this ...i did not find any solution for this.
With Regards
Ch.Gayatri
|
|
|
|
|
Search on the internet - you will find some startup and medium level examples on the navigational framework.
My signature "sucks" today
modified on Thursday, June 10, 2010 7:39 AM
|
|
|
|
|
You need to use the navigation framework for Silverlight. The easiest way to do this is to start from scratch by building a Silverlight Navigation Application.
BTW, you need to be writing Silverlight 3 or higher...
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|
|
I am trying to display an icon from a file on my WPF page. I am successfully able to get the icon. I then convert it to a bitmap using icon.ToBitmap(). I then convert it to a BitmapImage using the following code...
private BitmapImage ConvertIconToBitmapImage(Icon icon)
{
Bitmap bitmap = icon.ToBitmap();
MemoryStream ms = new MemoryStream();
bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
BitmapImage bImg = new BitmapImage();
bImg.BeginInit();
bImg.StreamSource = new MemoryStream(ms.ToArray());
bImg.CreateOptions = BitmapCreateOptions.None;
bImg.CacheOption = BitmapCacheOption.Default;
bImg.EndInit();
ms.Close();
return bImg;
}
This also works, BUT there is a black border around the image. How do I get rid of this black border? I read some post that say use a manifest file to enable visual styles. But I can't seem to get that to work. Maybe I'm including the manifest file wrong. I've also read some places to use Application.EnableVisualStyles() but that doesn't work with WPF (I believe). Does anyone have any ideas?
Thanks.
|
|
|
|
|
In the XAML, set the image BorderBrush to {x:Null} .
"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 figured this out for anyone else that has the same problem. It's very simple actually.
In the code..
<br />
bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);<br />
change it to...
bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
Thats it!
|
|
|
|
|
I have asked two questions on data-binding already but I'm still stuck .
Maybe it would be better if I asked more generally -- what are reasons which can spoil data-binding?
Greetings - Jacek
|
|
|
|
|
That's a bit too general. Post some code and the problem you are having (after Googling and trying to figure it out yourself, of course).
|
|
|
|
|
I found that your collection should be an ObservableCollection , and your collection items object should be derived from INotifyPropertyChanged . Once that's done' it should just work (assuming your Binding Path and ItemsSource is correct).
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|
|
I know, I use Observable collections as sorces for my controls. I construct them from EF data classes. But it doesn't really matter how do I construct them -- they stay as a part of GUI and are commited on a clich on a button.
OK, I know it's bad, but here I upload my project.
You are welcome to solve the WPF challenge. I think it will be easy for a professional -- most probably I do a big bad error which is usual for noobies. Enjoy.
Hotfile download[^]
I'm sorry - it's not because I am too lazy. I just don't know how to formulate a question. I have no idea what's going on - it should work, you know.
Thanks
Greetings - Jacek
|
|
|
|
|
When I call a method in a WCF web service from a silverlight app, I get this:
An exception occurred during the operation, making the result invalid. Check InnerException for exception details.<br />
at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()<br />
at FMDashboard2.FMDashSvc3Ref.GetMetricDataCompletedEventArgs.get_Result()<br />
at FMDashboard2.Objects.DataRetrieval.service_GetMetricDataCompleted(Object sender, GetMetricDataCompletedEventArgs e)
Calling webService.OpenAsync() succeeds, but I can't call a method (which happens to be the one and only method in the service).
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|
|
Does inner exception provides something useful?
|
|
|
|