-
- BitmapSource From PixelBytes
by OlegSav
- 3 Replies
- Last post
by OlegSav
- I have this function that converts BitmapSource to byte array.
Public Shared Function BitmapSourceToByte( ByVal BitmapSource As Media.Imaging.BitmapSource) As Byte ()
Try
Dim Stride As Integer = BitmapSource.PixelWidth * ((BitmapSource.Format.BitsPerPixel + 7) / 8)
Dim PixelArray(Stride * BitmapSource.PixelHeight) As Byte
BitmapSource.CopyPixels(PixelArray,
-
- How to create a multi-column combo box with WPF?
by KentW
- 14 Replies
- Last post
by leemon99
- What¡¯s the best approach to build a combo box with a multiple column list view as dropdown
TIA
Kent
-
- Override background color of item selected in a ListBox
by Chris.2007
- 4 Replies
- Last post
by Chris.2007
- I'm trying to override the background color of the selected item in a ListBox. I started with the ListBoxStyles example in the SDK, which has some good mouseover effects. The XAML code is:
<Style x:Key="Triggers" TargetType="{x:Type ListBoxItem}"> <Style.Triggers> <Trigger Property="ListBoxItem.IsMouseOver" Value="true"> <Setter
-
- Performance Problem with UserControl and Trigger setting ZIndex
by shaper
- 3 Replies
- Last post
by shaper
- Hello,
I've got a big problem. I created a UserControl and have 288 instances of this UserControl on my Window. Through a Style Trigger I set the ZIndex property of my UserControl to "1" (the Control should pop above other controls on my Window when the mouse is over). The big problem is, that when I hover the mouse over my control the UI Thread nearly needs 3 seconds for setting the
-
- Binding Foreign Key to "Default" View (For Sorting)
by -&#61;B3N&#61;
- 11 Replies
- Last post
by -=B3N=-
- If I've bound a combobox or listbox to a "Groups" datatable and want it to sort alphabetically, I can simply say:
Code Snippet tblGroups.defaultview.sort = "GroupName"
and it does so.
However if I have another control which binds to the foreign key of this table "Users" (FK_tblGroups_tblUsers) and want this control to sort alphabetically by
-
- Reading and Writing image "Rating" metadata
by Cezary
- 14 Replies
- Last post
by Avner
- I'm looking for a way to read and modify "Rating" metadata that Vista uses to rate image files.
I'm able to read the rating although I noticed that the rating is written in several places in metadata... and I'm not sure which Vista is using... it looks like all of them are changed at the same time and are kept in sync... so do I have to modify all of them to keep them in sync
/xm
-
- LINQPad is here!
by Joe Albahari
- 9 Replies
- Last post
by Joe Albahari
- Ever gone to SQL Management Studio and started accidentally typing a query in LINQ Well now you can interactively query your databases in LINQ! LINQPad is small free utility for writing ad-hoc LINQ queries - requiring no typed DataContext. You can use it for learning LINQ as well as improving productivity when writing ad-hoc queries. Never struggle with a correlated subquery again! LINQPad also r
-
- Cannot delete record.
by Alex Simkin
- 4 Replies
- Last post
by Alex Simkin
- Playing with demo application and trying to test delete-insert-delete scenario.
delete orders where order_id = 2
insert into orders ( order_id , order_date ) values ( 2 , GetDate ())
delete orders where order_id = 2
Got the following error:
Msg 2627, Level 14, State 1, Procedure orders_delete_trigger, Line 3
Violation of PRIMARY KEY constraint 'PK__orders_to
-
- Answer How do I get the LINQ to SQL designer to regenerate the entity/data context code?
by Jon Kruger
- 3 Replies
- Last post
by Wael Farag
- Is there a way to get the LINQ to SQL designer to regeneate all of the entity/data context code It will generate it the first time, but if I change anything in the designer, I will need to regenerate that code. No matter what I do (add new tables to the designer, completely delete the .designer.cs file), it never regenerates. Jon
-
- Question regarding XBap deployment steps for IIS 6.0
by Doug_R_2007
- 7 Replies
- Last post
by DougRotondo
- Forgive me if this question is a bit basic, but I'm trying to get a written procedure down for correctly publishing XBAPs in IIS 6.0.
Here is what I have down, please add/correct any steps:
Create your XBAP project, (obviously.) I currently setup my projects in VS, then I work with it in Expression Blend, then once I'm ready to deploy my work I re-build it in VS again.
On deploymen
-
- How-to set focus on some element of dynamically created UserControl?
by sergun
- 4 Replies
- Last post
by sergun
- I create UserControl dynamically and add it to Children of the Window.
What should I specify in XAML of UserControl and in code of window to set focus on first textbox in created UserControl
-
- WCF // Msmq // Logging a failed method
by sholliday
- 2 Replies
- Last post
by sholliday
- < service name = " MYServiceName "
behaviorConfiguration = " DefaultThrottlingBehavior "
>
< endpoint
address = " net.msmq://localhost/private/MyApplicationQueue "
binding = " netMsmqBinding "
bindingConfiguration = " NoMSMQSecurity "
contract = " IMyService "
>
</ endpoint
-
- JpegBitmapDecoder & memory streams
by amoore
- 2 Replies
- Last post
by amoore
- I have created a decoder for a jpeg.
JpegBitmapDecoder decoder = new JpegBitmapDecoder (fstemp, BitmapCreateOptions .None, BitmapCacheOption .None);
This works well when using a filestream for the first parameter but if I do the following:
Stream ms = new MemoryStream ();
newBitmap.Save(ms, ImageFormat .Jpeg);
And try and pass this in as a parameter to
-
- Change TextBlock Text in a ControlTemplate in CodeBehind
by ryeisdead
- 6 Replies
- Last post
by ryeisdead
- Hi, I need help. I have the following in XAML:
Code Snippet
< ControlTemplate x:Key = " CloseableTabItemTemplate " TargetType = " {x:Type TabItem} " >
< Border SnapsToDevicePixels = " True " >
< Grid Margin = " 0,0,1,0 " >
< Border x:Name = " Bd " Background = " {TemplateBinding Bac
-
- Set the value of ConverterParameter to a property defined in code behind
by MatthieuGD
- 5 Replies
- Last post
by MatthieuGD
- Hello,
I would like to set the value of a ConverterParameter to a property defined in the code-behind of my Window. I'm kind of lost in markup extensions, should I need to use x omeThing etc ... I try this one :
ConverterParameter={RelativeSource Self.MyProperty}
but I got an error at the runtime :
'Self.MyProperty' string cannot be converted to object of type 'System.Win
-
- What is TextBox.OnTextInput (TextComposition) used for?
by Schneider
- 3 Replies
- Last post
by LesterLobo - MSFT
- TextCompositionAutoComplete, TextCompositionManager, TextCompositionEventArgs etc. Just curious what these are for as MSDN documentation is very vague. In particular I would like to know when you would use TextBox.OnTextInput as opposed to OnTextChanged, OnKeyDown etc.
-
- Multiple DataBindings to Children Elements
by Matthew Lebo28574
- 2 Replies
- Last post
by Matthew Lebo
- Using the below XAML as an example how can i make it so that when one of the labels in the stacker is clicked that my first textblock in the grid is data bound to text of the inner textblock of the label that was clicked
<Grid> <TextBlock> *This is where data should be bound* </TextBlock> </Grid>
<StackPanel Label.MouseUp="LabelClickHandler">
-
- using resources with DependencyProperties
by Frederik D
- 2 Replies
- Last post
by Frederik D
- I'm making a user control that contains an image.
I've made a property ButtonImage of the type Image and this property should be a dependency property:
public static DependencyProperty ButtonImageProperty = DependencyProperty .Register( "Picture" , typeof ( Image ), typeof ( ucMenuButton ));
public Image ButtonImage
{
get { return ( Image )GetValue(ButtonImag
-
- June CTP EDM Query
by weblivz
- 3 Replies
- Last post
by weblivz
- I generated the csdl, msl and ssdl files from the northwind database as i have been trying a few things out accoring to the chm help file.
However, as it only works in VS Web the .cs files are not generated, but can be found the temp compiled directory under the framework in system32.
Because of this i can't reference them unless i copy them to the app_code rather than having them ge
-
- What is the use of XBAP vs SilverLigth ??
by Serge Calderara
- 5 Replies
- Last post
by Serge Calderara
- Dear all,
I am studying actually the idea of soinf my client application using WPF. For that I bought a nice and clear book from Adam Nathan on WPF.
In that book is explain the 2 application approach as WPF and XBAP.
Teh first one is clear for me as a client WPF Windows application. But that I do not see the benefit that I could get if I build my application as XBAP. For me seems that
-
- Getting errors when creating xaml control
by ClemsonTigers71
- 7 Replies
- Last post
by ivolved_Mike_Brown
- I am trying to create a SecureStringTextBox object in 3.0 using xaml. I created a
control that looks like this:
xaml code
<TextBox x:Class="PP.Controls.SecureStringTextBox"
xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation "
xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml ">
</TextBox>
code behind
namespace PP.Controls
{
public partial cl
-
- XAML Custom Classes & Collection Properties
by MuscleHead
- 4 Replies
- Last post
by MuscleHead
- I am trying to define a custom class (hierarchy) to be used in XAML. I've just started with the root of my class hiearchy, and I'm running into problems.
I'm not sure if I'm doing this the right away, so let me provide a bit of context. My root class inherits from ModelVisual3D (as well as my own interfaces), since it is meant to be inserted under a Viewport3D in a XAML file. I do nothing with
-
- WPF Border Control - Dashed lines
by pradeepyr
- 6 Replies
- Last post
by Marlon Grech
- I am using Border control in my WPF application.
How to display a border control having dashed line border
-
- MSMQ PeekById
by GiriN
- 4 Replies
- Last post
by Sorin Alexander - MSFT
- Hi,
In our application v r using MSMQ (Local System Private Queues)
writing and reading queus are done with two seperate threads
V r using GetAllMessages And retrieved all the messages.
but wen v r using PeekById v r getting "Invalid Handle was passed to the function" exception
but on writing v didnt mention any Id
v r getting Id from tat Messages returned from GetA
-
- Inject Operations into WSDL
by Past
- 4 Replies
- Last post
by Past
- Hi All,
I am looking for a solution to add additional operations to a WSDL. for example there is a WCF service with its contract and WSDL. Is it possible to add some additional operations which can be seen in the WSDL without modifying the original service contract Does WSDL import and export extension help in this regard
Please point me to any articles if available or any info would be