|
Hi,
I just started a silverlight 4 application in VS2010, enabling RIA services. Installed the Silverlight 4 Tools. and as i debug, i am finding this exception.
an unhandled win32 exception occurred in plugin-container.exe
please help me get throught this as its quite annoying as my VS2010 keeps on crashing. and also the browser reports, the silverlight plugin has crashed. I tried reinstalling VS2010 and SL tools. doesnt work.
Thanks,
Manu
|
|
|
|
|
Hello.
I'm new on WPF. I'm trying to use a Path as content of a button. The problem is that using the same path on different buttons, the path is only visible on the last one created.
This is the declaration of the path on a ResourceDictionary
<Path x:Key="CloseGeometry" Fill="{StaticResource DefaultForeground}" Stroke="Transparent"
Data="M 4,4 L 4,16 L 16,14 L 16,20 L 30,10 L 16,0 L 16,6 Z">
</Path>
And this is how I try to use it like button content.
<Button Name="dataEndavantButton" Style="{StaticResource AppButtonStyle}" Content="{StaticResource CloseGeometry}"></Button>
What I'm doing wrong?
Thanks in advance.
modified on Tuesday, September 28, 2010 5:49 AM
|
|
|
|
|
This article[^] should help you out.
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.
|
|
|
|
|
Thx a lot for the link. It goes beyond what I expected as answer. It gives me a wider look to the button design...
Best regards, Xavier
|
|
|
|
|
Does Silverlight 4 (VS2010) allow editing code while debugging?
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.
modified on Tuesday, September 28, 2010 12:21 AM
|
|
|
|
|
Great question. If you are using 64Bit machine. It won't allow. Like you, I'm also having the same problem. I haven't checked it with 32-bit machine.
|
|
|
|
|
|
Thanks.
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.
|
|
|
|
|
|
|
Hi,
I have the following deceleration of a rich text box:
<RichTextBox
x:Key="rtfBox"
SpellCheck.IsEnabled = "False"
ContextMenuService.ShowOnDisabled="True"
ContextMenu="{StaticResource rtfBoxContextMenu}">
</RichTextBox>
And the context menu is defined as a resource on the same xaml as follows:
<ContextMenu x:Key="rtfBoxContextMenu">
<MenuItem Command="Copy"/>
<MenuItem Command="Cut"/>
<MenuItem Command="Paste"/>
<Separator/>
<MenuItem Command="My:MyCommands.ToggleSpellChecker" IsCheckable="true"/>
</ContextMenu>
I would like to bind the check box of the menu item to the state of the spellcheck isenabled property.
Please help. What minimal xaml/code is needed for that?
10x
|
|
|
|
|
You could name the CheckBoxMenuItem and bind it via property path. Like
<ContextMenu x:Key="rtfBoxContextMenu">
<MenuItem Command="Copy"/>
<MenuItem Command="Cut"/>
<MenuItem Command="Paste"/>
<Separator/>
<MenuItem Command="My:MyCommands.ToggleSpellChecker" IsCheckable="true" Name="menuItemCheckBox"/>
</ContextMenu>
<RichTextBox
x:Key="rtfBox"
SpellCheck.IsEnabled = "{Binding Source={StaticResource rtfBoxContextMenu}, Path=menuItemCheckBox}"
ContextMenuService.ShowOnDisabled="True"
ContextMenu="{StaticResource rtfBoxContextMenu}">
</RichTextBox>
|
|
|
|
|
Hi,
I have a wpf rich text box that I open and show in a win32 application.
I declare the rtf box in a resource dictionary like so:
<RichTextBox
x:Key="rtfBox"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
/>
In another place, I have a wpf window which I use as a floating tool bar. I declare it in its own xaml, similar to the following:
<Window x:Class="BidiFix.SandBox.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Title="Window1" AllowsTransparency="True" Focusable="False" ShowActivated="False" ShowInTaskbar="False"
SizeToContent="Width" Height="24" Topmost="True" Padding="2"
WindowStyle="None" Background="Transparent" >
<Border>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="2">
<Button Command="Copy" Context="Copy"/>
<Button Command="Cut" Context="Cut"/>
<Button Command="Paste" Context="Paste"/>
</StackPanel>
</Border>
</Window>
I instantiate and show the window using the following code:
RichTextBox rtfBox = GetTheBox();
Window1 win = new Window1();
win.Show();
Now, as you can see I have both the rtf box and window available. But the window is not an ancestor of the rtfBox, nor do they share the same xaml.
What minimal markup and/or code is needed to connect the Clipboard commands and button states to the rtf box, such that they will reflect their availability based on the selection state in the rich text box and when click will operate on the rich text box.
Please help.
10x.
|
|
|
|
|
Hi,
I would like to easily record the changes made to the of RichTextBox (user and/or programmatic) as well as the changes made to the FlowDocument and be able to save and play them again.
I was thinking about the do/undo queue of the document. How do I get access to it?
Also, can UIAutomation or something like this can help me?
In short, can you to me what my options are?
10x
Dani
|
|
|
|
|
I have a custom canvas control which sits inside a scrollviewer - I have implemented drag, drop and move for items on the canvas and overridden MeasureOverride so that when I move an item around on the canvas its size reflects the changes so if I move the item beyond the visible portion of the canvas it will resize to accomodate the moved item and scrollbars will show appropriately.
However if I then bring the item into view by using the scrollbars then start to move the item back out again the scrollbars go a bit haywire.
It's a rather poor explanation of the problem I afraid but I am not sure how else to put it but hopefully it will contain enough info for somebody to point me in the right direction.
|
|
|
|
|
Hi RugbyLeague,
I could understand the problem. You are having a visual studio designer like custom canvas control, in which you will be having controls. The problem is with scrollbar of the scroll viewer in which the canvas is hosted. Right?
RugbyLeague wrote: bit haywire.
Do you mean, the scroll bars of the scroll viewer not scrolling smoothly?
If that is the case. So far known best way is, You have to create your own calculation for updating the scrollviewer's vertical and horizontal offset.
|
|
|
|
|
If I move an object down to the right hand corner of the canvas then further so I can't see the object the scrollbars react accordingly. If I then bring the object into view by using the scrollbars then move the object again its as though the scrollbars think the object is back in the original viewable area of the canvas and disappear. if I then move the object to the bottom right again the scrollbars reappear but are out of synch with where they think the object is.
Similar behaviour is seen in the app in this article:
WPF Diagram Designer - Part 2[^]
|
|
|
|
|
I have managed to do a full row selection, however i can still see a black rectangle on a cell that i click on. How can i make it so that it will not show it?
Thanks in advance.
|
|
|
|
|
This[^] thread most probably answers your question.
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.
|
|
|
|
|
I am unable to achive this. One example uses DataGridFrozenGrid that is only avaible in Silverlight
others when selected, content disappears.
Edit: Partualy figure it out. All those wanted me to use VisualManager while i didn't know what it is. Also i wanted to see the default style and template to modify but was out of luck because template browser didn't saw DataGridCell.
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="BorderThickness" Value="0"/>
</Trigger>
</Style.Triggers>
<Setter Property="Focusable" Value="False"/>
</Style>
</DataGrid.CellStyle>
The only thing that remaind is that i override key events, so that it handles up and down keys.
modified on Sunday, September 26, 2010 4:15 PM
|
|
|
|
|
Hi everyone,
it's my first post so be gentle . I'm having difficulties converting a colored image to grayscale in a silverlight application. Clicking the link you can see the results of my code (left is the original pic right the resulting grayscale pic):
Link
I have no idea what I'm doing wrong. It should work but it doesn't. Help would be appreciated!
One other thing, the WriteableBitmap.setPixel and WriteableBitmap.getPixel functions are part of the WritableBitmapEx library downloaded from Codeplex.
Here's the code:
private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
{
convertToGrayscale(new WriteableBitmap((BitmapSource)this.Original.Source));
}
public void convertToGrayscale(WriteableBitmap image)
{
var p = image.Pixels;
for(int y=0; y<image.PixelHeight; y++)
{
for(int x=0; x < image.PixelWidth; x++)
{
Color c = image.GetPixel(x, y);
byte gray = (byte)((c.R*11 + c.G*16 + c.B*5)/32);
image.SetPixel(x, y, Color.FromArgb(c.A, gray, gray, gray));
}
}
this.resultImgBox.Source = image;
}
modified on Sunday, September 26, 2010 8:09 AM
|
|
|
|
|
Well - could be something wrong with the algorithm.
Try byte gray = (byte)((c.R + c.G + c.B)/3); instead.
See here.
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.
|
|
|
|
|
Already tried few different formulas (the one you proposed also) for calculating a gray pixel always with the same (bad looking) results.
|
|
|
|
|
Hi Lenquist
Ran some tests (i.e. setting the pixel to the returned GetPixel with no modification) and the image changed.
Turns out there is a problem with the GetPixel in the extensions library, which has been fixed.
You need to go to http://writeablebitmapex.codeplex.com/SourceControl/list/changesets and download the latest source and compile it yourself.
|
|
|
|
|
It works now, thanks for your answer!
|
|
|
|