Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
GeneralRe: What this mean ??. This code works fine Pin
AnnieMacD13-Nov-11 9:49
AnnieMacD13-Nov-11 9:49 
GeneralRe: What this mean ??. This code works fine Pin
Pete O'Hanlon13-Nov-11 10:03
mvePete O'Hanlon13-Nov-11 10:03 
GeneralRe: What this mean ??. This code works fine Pin
AghaKhan13-Nov-11 16:00
AghaKhan13-Nov-11 16:00 
RantRe: What this mean ??. This code works fine Pin
Smithers-Jones13-Nov-11 22:54
Smithers-Jones13-Nov-11 22:54 
GeneralRe: What this mean ??. This code works fine Pin
Pete O'Hanlon14-Nov-11 0:12
mvePete O'Hanlon14-Nov-11 0:12 
QuestionC# beginer a deploy Q using report viwer Pin
pinifg13-Nov-11 2:56
pinifg13-Nov-11 2:56 
Questionis this good C# linq to sql code? Pin
Member 821751712-Nov-11 14:17
Member 821751712-Nov-11 14:17 
AnswerRe: is this good C# linq to sql code? Pin
Not Active12-Nov-11 16:32
mentorNot Active12-Nov-11 16:32 
GeneralRe: is this good C# linq to sql code? Pin
Member 821751713-Nov-11 13:17
Member 821751713-Nov-11 13:17 
GeneralRe: is this good C# linq to sql code? Pin
Not Active13-Nov-11 13:52
mentorNot Active13-Nov-11 13:52 
AnswerRe: is this good C# linq to sql code? Pin
SledgeHammer0113-Nov-11 7:17
SledgeHammer0113-Nov-11 7:17 
GeneralRe: is this good C# linq to sql code? Pin
Richard Andrew x6413-Nov-11 7:58
professionalRichard Andrew x6413-Nov-11 7:58 
GeneralRe: is this good C# linq to sql code? Pin
Not Active13-Nov-11 13:49
mentorNot Active13-Nov-11 13:49 
GeneralRe: is this good C# linq to sql code? Pin
SledgeHammer0113-Nov-11 13:59
SledgeHammer0113-Nov-11 13:59 
GeneralRe: is this good C# linq to sql code? Pin
Not Active13-Nov-11 14:05
mentorNot Active13-Nov-11 14:05 
GeneralRe: is this good C# linq to sql code? Pin
SledgeHammer0113-Nov-11 14:27
SledgeHammer0113-Nov-11 14:27 
GeneralRe: is this good C# linq to sql code? Pin
BobJanova13-Nov-11 22:30
BobJanova13-Nov-11 22:30 
AnswerRe: is this good C# linq to sql code? Pin
omidh200713-Nov-11 11:58
omidh200713-Nov-11 11:58 
QuestionWinForms - Zoom In/Out (MS Word-Style) Pin
Matt U.12-Nov-11 6:46
Matt U.12-Nov-11 6:46 
AnswerRe: WinForms - Zoom In/Out (MS Word-Style) Pin
Alisaunder13-Nov-11 2:30
Alisaunder13-Nov-11 2:30 
I am using scaling to perform what you are wanting.

First create your slider in Xaml.
HTML
<StackPanel Orientation="Horizontal" x:Name="StatusBarSlider">
     <TextBlock Foreground="#FF9585b9" Name="StatusBarItem" Margin="0,1,0,1" Padding="6,0,6,0" Text="{Binding ElementName=scaleSlider, Path=Value, Converter={StaticResource PercentageConverter}, ConverterParameter=%}" />
     <RepeatButton Margin="1,0,1,0" CommandTarget="{Binding ElementName=scaleSlider}" ribbon:ScreenTipService.ScreenTipHeader="Zoom Out" Style="{StaticResource {x:Static ribbon:RibbonStyles.StatusBarSliderDecreaseButtonKey}}"/>
     <Slider x:Name="scaleSlider" Width="100" Value="1.0" Minimum="0.5" Maximum="2.0" LargeChange="0.5" SmallChange="0.1" VerticalAlignment="Center" IsSnapToTickEnabled="True" TickFrequency="0.1" ribbon:ScreenTipService.ScreenTipHeader="Zoom" />
     <RepeatButton Margin="1,0,1,0" CommandTarget="{Binding ElementName=scaleSlider}" ribbon:ScreenTipService.ScreenTipHeader="Zoom In" Style="{StaticResource {x:Static ribbon:RibbonStyles.StatusBarSliderIncreaseButtonKey}}"/>
</StackPanel>


Then I use this for the code controlling the slider.

C#
// preparing tab content slider transformation
ScaleTransform scaleTransform = new ScaleTransform();
Binding scaleXBinding = new Binding("Value");
scaleXBinding.Source = scaleSlider;
Binding scaleYBinding = new Binding("Value");
scaleYBinding.Source = scaleSlider;

// binding main form slider to tab content
BindingOperations.SetBinding(scaleTransform, ScaleTransform.ScaleXProperty, scaleXBinding);
BindingOperations.SetBinding(scaleTransform ScaleTransform.ScaleYProperty, scaleYBinding);

Contact2.LayoutTransform = scaleTransform;


Contact2 being the name of the form in which you wish to rescale.

I hope this helps. There are probably more efficient ways to achieve the same thing but this is what I did and it works perfectly fine. Wink | ;)
GeneralRe: WinForms - Zoom In/Out (MS Word-Style) Pin
loyal ginger13-Nov-11 2:39
loyal ginger13-Nov-11 2:39 
GeneralRe: WinForms - Zoom In/Out (MS Word-Style) Pin
Alisaunder13-Nov-11 2:41
Alisaunder13-Nov-11 2:41 
AnswerRe: WinForms - Zoom In/Out (MS Word-Style) Pin
BillWoodruff13-Nov-11 11:00
professionalBillWoodruff13-Nov-11 11:00 
QuestionText Entry / Scrolling Dilema Pin
PDTUM12-Nov-11 6:41
PDTUM12-Nov-11 6:41 
AnswerRe: Text Entry / Scrolling Dilema Pin
BillWoodruff13-Nov-11 11:24
professionalBillWoodruff13-Nov-11 11:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.