|
This error is telling you that the version of the framework that you are targeting is completely different from the version this DLL was written in. In other words, there is no compatibility at any level as one uses the Silverlight assemblies and one doesn't. Now, bear in mind that you would be expecting the two frameworks to be attempting to run in the same application process space, how do you expect it to load and run two different sets of some of the same assemblies at the same time?
You can go from Silverlight to none-Silverlight assemblies, but you can't do it the other way round. I see that TIBCO have partnered with MS on Silverlight functionality, so it's entirely possible that they have a Silverlight version that you can use.
|
|
|
|
|
|
No there is no way to solve this problem - sorry.
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.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
The library you're trying to add a reference for wasn't compiled for Silverlight. If you have the source code to the library, and if it doesn't use libaries for code that Silverlight doesn't all, you can recompile it and then link it. Otherwise, you're screwed.
.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
|
|
|
|
|
Hi,
Silverlight 4, Expression Blend 3
I understand template triggers in WPF are not available in Silverlight...
I used Blend to create a button template - i want the button to grow in size on the mouseover event.
I added a transition to the button in Blend and it generated the zaml...
Im assuming the latest fashion is 'VisualStateManager.VisualStateGroups' instead of triggers to do this in Silverlight...
This works fine but when the animation is complete the button resizes itself to the original size - I want the button to retain its size while the mouse is over.
Ive listed the relevant zaml below - ive tried setting storyboard properties but still the button flicks back to its original size once the animation is complete.
Does anyone know how I can retain the buttons size?
Thanks,
Chas
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Focused"/>
<VisualState x:Name="Unfocused"/>
</VisualStateGroup>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="00:00:00" To="MouseOver">
<Storyboard AutoReverse="False" SpeedRatio="1">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1.654"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1.16"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualTransition>
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver" />
<VisualState x:Name="Pressed"/>
<VisualState x:Name="Disabled"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
modified on Friday, December 17, 2010 7:35 AM
|
|
|
|
|
Ok for anyone else who experiences this...
move the storyboard out of VisualStateGroup.Transitions and into <VisualState x:Name="MouseOver" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Margin="0,0,0,0" VerticalAlignment="Bottom">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver" >
<Storyboard AutoReverse="False" SpeedRatio="1">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1.654"/>
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
I am trying to change the border color of a WPF TextBox when it has focus. I'm doing this in code using the focus events:
private void TextBox_GotFocus(object sender, RoutedEventArgs e)
{
_text.BorderBrush = Brushes.Red;
}
private void TextBox_LostFocus(object sender, RoutedEventArgs e)
{
_text.BorderBrush = Brushes.Blue;
}
This does not work. My googling seemed to indicate that the TextBox has built in focus behavior that could be overriding my behavior. The proposed solution was to null the "TextBox.FocusVisualStyle' property. This also did not work.
Any ideas out there?
Aaron
|
|
|
|
|
You would need to modify the control template. The border shenanigans are done in there. The ListBox, TextBox, etc. all use a "chrome border" which does all that using triggers.
|
|
|
|
|
I have try but not success
My code is
<br />
<Window x:Class="WpfApplication3.Pratice"<br />
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br />
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br />
Title="Pratice" Height="300" Width="300"><br />
<Window.Resources><br />
<Style TargetType="{x:Type TextBox}"><br />
<Style.Triggers><br />
<Trigger Property="IsFocused" Value="True"><br />
<Setter Property="BorderBrush" Value="Red"></Setter><br />
<Setter Property="BorderThickness" Value="4" /><br />
</Trigger><br />
</Style.Triggers><br />
</Style><br />
</Window.Resources><br />
<Grid><br />
<TextBox Name="Text1" Height="100" Width="100" BorderBrush="Pink">Hello</TextBox><br />
</Grid><br />
</Window>
Life's Like a mirror. Smile at it & it smiles back at you.- P Pilgrim
So Smile Please
|
|
|
|
|
In the xaml of the window, do this:
<Window.Resources>
<Style x:Key="TextBoxStyle" TargetType="TextBox">
<Style.Triggers>
<Trigger Property="IsFocused" Value="False">
<Setter Property="BorderBrush" Value="Blue"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
|
|
|
|
|
This answer will upset the wpf-purists out there, but when time is money, try this:
Instead of creating a ControlTemplate-Trigger nightmare, reduce the TextBox size with Margin="1" and BorderThickness="0". THEN, place the TextBox inside of Grid tags and place a <rectangle strokethickness="1" stroke="YourColorHere"> in the Grid above TextBox. Example (with binding examples):
<Grid>
<Rectangle Stroke="{Binding CustomBorder}" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
<TextBox Text="{Binding Path=Value}" Margin="1" BorderBrush="Transparent" BorderThickness="0"/>
</Grid>
This code can be injected into a DataTemplate for a GridView or simply in a Window. Adding triggers to a simplified structure will prove easier than trying to override animations dependent on .Net version and operating system. I hate seeing my controls looking different on an XP system vs Win7, so this helps keep my projects looking clean on any display.
Duct-tape solutions aren't always that bad!
|
|
|
|
|
I am using a WCF project in my silverlight 4 project.
At present I have a few settings inside the web.config file of the WCF project which I read from a service file inside the wcf project.
After deployment of this silverlight application, will I be able to see this web.config (Which is inside the wcf project) file and manually update it with new settings so that I do not have to recompile and redeploy each time?
What I mean is:
I know that the web.config file in the web host project can be modified after deployment and there is no need to redploy, etc.
The question is can I make changes in the web.config file which is inside the wcf project without any redeployment? will the service be able to read the new settings in the web.config after it has been manually changed?
Is it possible to manually browse to the wcf web.config file and modify it?
Thanks
|
|
|
|
|
You should be able to edit it, because I have done that before. What you might have to do is to restart the website that the service is running on to make sure that it gets the new settings.
Steve Maier
|
|
|
|
|
Hi arkiboys,
You can change the content of the web.config whatever way you want, provided you have the correct access rights for that.
In order for IIS to take care of the changes, just type iisreset at a command prompt on your web server, and it will reload its configuration.
Hope this helps. Kind regards.
|
|
|
|
|
How do I make my silverlight 4 application (The solution includes silverlight page, wcf project) so that someone in the office can access it?
Thanks
|
|
|
|
|
By deploying it to an IIS server that they can get access to, and properly configuring it.
|
|
|
|
|
Do you want to share your Project with other Programmers ? want to share the source ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I have created a silverlight 4.0 in vs 2010 application as follows:
1-The solution contains the the usual web project for hosting the silverlight app.
2- The solutions also contains a WCF project and the silverilght project with the silverlight pages and the service references to the WCF.
How do I make this so that others can access it please?
Thanks
|
|
|
|
|
You now need to host this application on a web server.
Users can then access this application via the url of the server plus your application.
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.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
You've asked an awful lot of fairly basic questions. Can I suggest that you buy a good book on Silverlight development which will save you an awful lot of effort. I like Silverlight 4 Unleashed[^] and think it would help you immensely.
|
|
|
|
|
|
I'm adding controls to a Grid at runtime:
string SquareName = "square" + Row.ToString() + Col.ToString();
Frame square = new Frame()
{
Name = SquareName
};
Grid.SetRow(square, Row);
Grid.SetColumn(square, Col);
grdBoard.Children.Add(square);
Then later I'm trying to get a reference to the frame:
private Frame _GetFrame(int Row, int Col)
{
string SquareName = "square" + Row.ToString() + Col.ToString();
Frame frame = (Frame)grdBoard.FindName(SquareName);
return frame;
}
It returns null always. The commented code above it also returns null.
As a test I added a button in th XAML. Then I tried this:
Button button = (Button)grdBoard.FindName("cmdTest");
Frame square = (Frame)grdBoard.FindName("square12");
The button was added in the XAML, the frame was added in the code behind at runtime.
Anyone know what I'm doing wrong?
Everything makes sense in someone's mind
modified on Tuesday, December 14, 2010 7:46 PM
|
|
|
|
|
|
Hey all,
I'm new to WPF/Silverlight, which I've noticed is of the sweet goodness.
In a project, I'd like to add a listbox/grid type control that's similar to the Contacts app on the iPhone, as seen in this screenshot[].
ie: it has an A-Z type thing on the side , which when clicked, takes you to the group of items starting w/ that letter.
The goal is to display a potentially "large" # of items in it but still make it easy to find the one you're looking for.
Maybe at the top, it'd have a textbox for autocompletion while typing, and/or a search button, similar to what you get in Blend for searching properties in the Property editor window.
Does anyone know what I mean? I'd be interested in any free or paid 3rd party control which has this or parts of this,so if you know of any, let me know.
If I should roll my own, could you describe the basic layout items? Would it just be a datagrid/dataview type control using a grouping feature, & scrollviewer & a few snippets to move it to items based on clicks, etc?
Any help is appreciated!
|
|
|
|
|
Hmm... two ways I can think of off the top of my head:
1) ListView in the GridView view mode with groups enabled. Then you'd style the items and style the group headers to look like your screen shot.
2) TreeView with the collapse / expand functionality disabled... first level would be A - Z, second level would be the items. Style the first level one way and the 2nd level the other way. Should be easy to disable the collapsing / expanding.
In either case, the A - Z overlay could be done a ton of ways too... vertical stackpanel with TextBlocks (or hyperlinks)... single selection listbox, etc.
No real personal preference between #1 and #2... they both sound like about the same amount of work.
Or you could just use a single listbox and manage inserting and deleting the header items.
|
|
|
|