|
|
Wow... the think that I personally like the most is the Out of Browser feature added .. Its awesome
|
|
|
|
|
Hi,
I have a StackPanel that contains a ListView
<StackPanel>
<ListView x:Name="theList" BorderBrush="{x:Null}" Grid.Column="1" Grid.Row="1" ItemsSource="{Binding PhoneBook.FilteredPhoneBook}" SelectionMode="Extended" Focusable="False" ItemTemplate="{StaticResource PhoneBookPostTemplate}" HorizontalAlignment="Center" ItemContainerStyle="{StaticResource ListViewItemStyle1}" >
....
</ListView>
</StackPanel>
The items in the ListView can be expanded if the want to edit it (the selected items height is then increasing). When the edit is finished I get a white space in the buttom of the list. It looks like the StackPanel has grown when I edit the item.
Example (but the list is vertical..)
Before edit: "X X X X X X"
After edit: "X X X X X X "
Question:
Can I remove the white space without setting OnPropertyChange("ContactBook"), which will repaint the list. The problem is that it takes some time to update the list with OnPropertyChange("ContactBook") since it can be many items in the list.
Regards
Magnus
|
|
|
|
|
marca292 wrote: Example (but the list is vertical..)
Before edit: "X X X X X X"
After edit: "X X X X X X "
From your example, it looks like an extra item is being added to the ListView??
When you fire the OnPropertyChange does it remove the space/item you are mentioning ?
|
|
|
|
|
Hi,
Thanks for quick answer!
In the debugger I can see that the StackPanel.Height is increasing when I edit an item. When the edit is finished the StackPanel keeps this new height. And thats why the list now contains a white space in the end.
Example:
Item X/Y shows this information in the list
Name:...
Address:...
But in edit mode you can type in (now is the stackpanel.Height increasing since the item contains more information, this is what I try to show with YYY)
Name:...
Address:...
Member id: ...
Gender: ...
Before edit: "X X X X X Y"
Edit: "X X X X X YYY"
After edit: "X X X X X Y "
Yes when I fire OnPropertyChange the white space is removed. But is there another way to decrease stackpanel.Height? It takes to much time to update the list with OnPropertyChange.
|
|
|
|
|
|
Yes but it did not solve the problem.
modified on Thursday, March 19, 2009 4:32 AM
|
|
|
|
|
Can you share the ItemTemplate and ItemContainerStyle ? What is your datasource -a List, ObservableCollection?
|
|
|
|
|
The email got filtered too. Set the Ignore HTML tags checkbox while posting the message.
|
|
|
|
|
My datasource is a generic List.
<DataTemplate x:Key="PhoneBookPostTemplate">
<Grid Name="grid" Margin="0,5,5,5" Width="200" KeyboardNavigation.TabNavigation="Cycle">
<Rectangle Name="background" Stroke="Gray" Fill="{Binding Customization.SMSPhoneBookContactColor}" Opacity="0.4" RadiusX="10" RadiusY="10" />
<StackPanel Margin="5" >
.....
</StackPanel>
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsEditing}" Value="true">
<Setter TargetName="noEdit" Property="Visibility" Value="Collapsed" />
<Setter TargetName="isEdit" Property="Visibility" Value="Visible" />
<Setter TargetName="editButton" Property="Visibility" Value="Collapsed" />
<Setter TargetName="saveButton" Property="Visibility" Value="Visible" />
<Setter TargetName="cancelButton" Property="Visibility" Value="Visible" />
<Setter TargetName="deleteButton" Property="Visibility" Value="Collapsed" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
<Style x:Key="ListViewItemStyle1" TargetType="{x:Type ListViewItem}">
<Style.Triggers>
</Style.Triggers>
<Setter Property="Template" Value="{DynamicResource ListBoxItemControlTemplate1}"/>
</Style>
<ControlTemplate x:Key="ListBoxItemControlTemplate1" TargetType="{x:Type ListBoxItem}">
<Border Focusable="False" SnapsToDevicePixels="True" x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<Grid>
<Rectangle Name="selectedBoreder" Stroke="{x:Null}" Fill="{Binding Customization.SMSSelectionBorder}" Margin="1" Opacity="0.4" RadiusX="10" RadiusY="10" Visibility="Collapsed" />
<ContentPresenter Focusable="False" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Visibility" TargetName="selectedBoreder" Value="Visible"/>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="True"/>
<Condition Property="Selector.IsSelectionActive" Value="False"/>
</MultiTriggerrvfbis.Conditions>
<Setter Property="Visibility" TargetName="selectedBoreder" Value="Visible"/>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
</MultiTrigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
|
|
|
|
|
I have run into a similar issue before and I think it was solved with a call to InvalidateMeasure().
|
|
|
|
|
HI,
I wanted to make multi Column Combo Box in WPF.
I did this through Object binding to Combo Box.
It is Displaying Fine But When I Select the item in combo Box its showing object name instead of Value. So due to this i am not able to search by typing in combo box item name.. Can any one tell how to solve this problem..
Thanks in Advance
Rakesh
|
|
|
|
|
Can you share the DataTemplate/Style for the ComboBox ?
|
|
|
|
|
Hi All,
I am trying to learn Silverlight, and for my exercise I am trying to build a application like ms paint in silverlight with some addition features like ability to resize objects (circles, rectangles etc). I am facing lots of difficulties.
Is it even possible to do that in silverlight?
thanks
|
|
|
|
|
logicon wrote: I am facing lots of difficulties.
With what part(s)?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Building a PaintBrush in Silverlight is not that hard (the painting part).
Where you would get troubles is in export the image to jpeg or printing, you have to duplicate your drawing code in the server side using GDI+ (well that's if you use an starndard hosting, some people has made some cheats using WPF on the server side).
HTH
Braulio
/// -------------------------
Braulio Díez
DBSchemaEditor.com
Free Silverlight based DB Schema Modeling Tool
/// -------------------------
|
|
|
|
|
Hi,
Is there any way to use sso in wpf? Pls help me if there any.
Gomathi R
|
|
|
|
|
What does SSO have to do with WPF?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have designed a page Using WPF. Instead of having a login page i am using this windows login.the application should take username from the active directory.
Gomathi R
|
|
|
|
|
The MediaElement is crap. So, I am trying to use WMP as a replacement. Here's the thing. I have a control that wraps WMP10 in my project, and it works fine. I copied it to another project, and it never plays video, only audio. Does anyone have any suggestions for a control I can download that plays video and does it smoothly, in WPF ?
I have found the WPFMediaKit, it doesn't work, it throws a COM Exception when it tries to create a video surface.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
What was your general issue with MediaElement? Was it was that it is full of memory leaks and crashes your application? Or was it would not playback video smoothly or took up too much CPU?
If it was too much CPU, most likely you are running hardware inadequate for WPF. MediaElement on newer hardware barely uses much more CPU than WMP. The common cause for low performance of MediaElement is a slow GPU that cannot render/allocate 3D surfaces fast enough or the x-fer rate over the bus is too slow.
At what line did MediaKit crash on you? I am the author of that project and would like to check if this is a bug, or just because the GPU is too old for the features I am using.
-Jer
|
|
|
|
|
how to bind a event to my data context class
Is this correct
|
|
|
|
|
I think u want to have some value in label when mouse is down. If so then call a method on MouseDown event and assign the value to the label as LABE.Text=value
Gomathi R
|
|
|
|
|
i am asking about binding with an function
I am writing an function mouse_down in a class
and i have to bind the function with this xAML code
can i do this
|
|
|
|
|
Can u explain me clearly. By finding a function means ,what value you are going to bind?
Gomathi R
|
|
|
|