The first result for lasso.
Insincere Dave
Posts
-
Graphical Lasso to Select Controls -
Apply two animations to a text block simultanouslyYou need to set the PositionCount of the TextEffect.
te.PositionCount = this.gameOver.Text.Length;
-
Non Rectangular Window in WPF HelpYou 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>
-
Disabling MenuItem IconUse {DyamicResource menuImageStyle} instead.
-
WPF Rotate transform issueTry LayoutTransform instead of RenderTransform.
-
multiple big images on canvas in WPF - rendering problemsIm guessing you are hitting the memory limit of the GPU. You might want to try TransformedBitmap and scale it that way, I quickly tested this with BitmapCacheOption.None and it seemed to only take up memory for the scaled image. As for the images looking wierd it may be due to a bug in WIC you may need get an updated version. Try Vista SP2 and the Platform Update For Windows Vista
modified on Wednesday, May 5, 2010 3:00 PM
-
Items collection must be empty before using ItemsSource !!!The separator you are adding in the xaml is being treated as an item, remove it or place it in the grid instead.
-
Problem in Jagged Line in 3d cube in wpfI think you may have to create it, there are quite a lot of discussions about it on the web that you can search for. I also came across http://stackoverflow.com/questions/39454/is-there-a-secret-trick-to-force-antialiasing-inside-viewport3d-in-windows-xp where it says it should be HKEY_LOCAL_MACHINE\Software\Microsoft\Avalon.Graphics\MaxMultiplesampleType. Neither of them exist on my vista machine but as they're mainly for debugging I think you create them. They affect all the WPF applications and its recommended your app/installer doesn't change them.
-
Problem in Jagged Line in 3d cube in wpfAnti-aliasing 3D content is not supported on windows XP. You could try changing HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\MaxMultisampleType as described in this article http://msdn.microsoft.com/en-us/library/aa970912.aspx.
-
Vexing StackOverflow Issue [modified]StackOverflows are usually caused by infinte recursion so I would look for any recursive methods you have or perhaps you are accidentally creating a recursive structure of parent-child-parent controls.
-
ScaleTransform sometimes produces glaring artifacts [modified]I can't remember where I first saw code using RenderTargetBitmap, you need to call measure and arrange if the item hasn't been added to the visual tree otherwise it's not necessary. WPF uses WIC so that patch might still be applicable but I don't know if it will fix the issue.
-
ScaleTransform sometimes produces glaring artifacts [modified]There is a recent update for WIC for xp that might contain the fix. This code might still cause the artifact you could try setting the BitmapScalingMode if it does.
void ScaleUsingRTB(string inFile, string outFile, double scale)
{
Uri uri = new Uri(inFile);
BitmapImage bitmapImage = new BitmapImage(uri);
var image = new Image
{
Source = bitmapImage, Width = bitmapImage.PixelWidth*scale, Height = bitmapImage.PixelHeight*scale
};
image.Measure(new Size(image.Width,image.Height));
image.Arrange(new Rect(0,0,image.Width,image.Height));
RenderTargetBitmap rtb = new RenderTargetBitmap((int) image.Width, (int) image.Height, 96, 96, PixelFormats.Pbgra32);
rtb.Render(image);Save(outFile,rtb);
}
-
ScaleTransform sometimes produces glaring artifacts [modified]Im glad that fixed it, I thought that was kind of a long shot really. I tried scaling an Image control and using RenderTargetBitmap and didn't notice any quality degradation so that might be a workaround for xp, there are some other options like System.Drawing aswell.
-
ScaleTransform sometimes produces glaring artifacts [modified]http://support.microsoft.com/kb/971644[^] Says you use windows update to get it.
-
ScaleTransform sometimes produces glaring artifacts [modified]The software rendering code goes in the loaded event and you apply it to the window, but im not sure it will have any effect if you are just saving the image and not displaying it. I've been working with a high res (5k by 7x) photo and haven't seen anything yet. Im using VS 2010 on vista but have tried targeting both 3.0 and 3.5 and checked they are referencing the correct version. I have also installed the platform update for vista which may have updated the windows imaging component. This thread is the only one i've found that might be applicable but I think you'll have to contact microsoft or try their wpf forums.
-
ScaleTransform sometimes produces glaring artifacts [modified]I had already tried 2904,5000 and didn't see anything. You could try forcing software rendering and see if it is a driver issue if not I don't have any more ideas.
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
hwndSource.CompositionTarget.RenderMode = RenderMode.SoftwareOnly; -
ScaleTransform sometimes produces glaring artifacts [modified]I thought you were applying a RenderTransform to an Image, I didn't know you were working with TransformedBitmap. I haven't been able to reproduce the issue yet. The following for me scales a 4288x4288 px image image as expected:
JpegBitmapDecoder dec = new JpegBitmapDecoder(new Uri(@"test.jpg"),BitmapCreateOptions.None,BitmapCacheOption.Default);
var image = dec.Frames[0];
var targetSize = 2900.0;
var scale = targetSize/image.PixelWidth;
TransformedBitmap scaledBitmap = new TransformedBitmap();
scaledBitmap.BeginInit();
scaledBitmap.Source = image;
scaledBitmap.Transform = new ScaleTransform(scale, scale);
scaledBitmap.EndInit();Content = new Image {Width = targetSize,Height = targetSize,Source = scaledBitmap};
If you could change the code so that it does cause the artifact I'll have another look but you may want to try the MSDN forums as you might get a reply from someone on the WPF team.
-
ScaleTransform sometimes produces glaring artifacts [modified]I don't completely understand the situation, are you enlarging or shrinking the images? You may want to post a picture too. As for the artifacts I would try changing the attached property RenderOptions.BitmapScalingMode and see if one of the modes eliminates the artifacts. I think they changed the default in .NET 4.0 to improve performance. Are the images photos or graphics, are you animating them? If they contain 1px wide lines or grids you may need to look at the positioning of the element, this is improved in .NET 4 by using LayoutRounding there are workarounds for previous versions.
modified on Sunday, December 6, 2009 8:05 PM
-
Looking For Video SoftwareI've worked with a similar Camcorder (Vixia HF10). The format it records in is called AVCHD you'll want to make sure the software supports that. Adobe CS4 does but you'll need a fairly well specced pc to edit the footage unless you convert it to something else. For editing Windows Live Movie Maker claims to support AVCHD and is free, I didn't have the pixela software installed and ran into problems but you can convert the original clips using Avidemux to something else then edit using movie maker. Xvid Video, MP3 Audio in an Avi is a fairly common combination you might want use.
-
Combobox causes lock upHow many results are there? The listbox will use a VirtualizingStackPanel im not sure about the ComboBox, if there are lots of results or you have a complex DataTemplate that could cause a slow down. You may want to break with the debugger when it stalls and look at the call stack too.