|
Hi dudes!
i just don`t know how to do this and can`t find and answer to this, i want to add a hyperlink image in richtextbox, hyperlink class doesn`t seem to work with images like hyperlink that is the problem.
Can somebody tell me what to do??
|
|
|
|
|
<richtextbox>
<flowdocument>
<hyperlink>
<image source="" />
</hyperlink>
</flowdocument>
</richtextbox>
Cheers, Karl
» CodeProject 2008 MVP
My Blog | Mole's Home Page
Just a grain of sand on the worlds beaches.
<div class="ForumMod">modified on Saturday, August 30, 2008 9:40 PM</div>
-- modified 27-Feb-21 21:01pm.
|
|
|
|
|
sorry i am new to this
but where do i put that?, how can i do that with C#?
and thanks for that answer dude
|
|
|
|
|
The below code is XAML, no code is required.
<RichTextBox>
<FlowDocument>
<Hyperlink>
<Image Source=" PUT THE IMAGE PATH & NAME HERE " />
</Hyperlink>
</FlowDocument>
</RichTextBox>
Cheers, Karl
» CodeProject 2008 MVP
My Blog | Mole's Home Page
Just a grain of sand on the worlds beaches.
-- modified 27-Feb-21 21:01pm.
|
|
|
|
|
oh i got it working now. But now i need it in C# code cause i need this stuff to be dinamicaly created
|
|
|
|
|
Cool.
Well, XAML is just another method of creating objects.
So just create the objects in code and nest them just like the XAML is.
RichTextBox and FlowDocument creation in code is an advanced WPF topic. But I'm the same way, if its hard, just go for it.
There is a SUPER book on writing WPF code: http://www.charlespetzold.com/wpf/index.html[^]
I strongly suggest you have a look at this. You can probably get a used one on www.Amazon.com.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hey guys...
ive got a WPF control(calender), im using a grid to split it up into cells. Each cell contains a Border, Canvas, WrapPanel, and two textBlocks.
The 1st Textblock will be used for the number that represents the day of the month and the 2nd will have a string value. I cant seem to get the 2nd textBlock to behave like i need it to.
I need its text to wrap around if the sting is vertically too long for the grid cell to show it all, and i need to "Dock" the stack panel to the canvas so that its the same size(and ontop of) as the canvas.
Heres my XAML for a single cell
<Border Name="Border00" Grid.Column="0" Grid.Row="2">
<Canvas Name="Canvas00" Grid.Column="0" Grid.Row="2" >
<StackPanel>
<TextBlock Name="dayTxt00" Text="1" />
<TextBlock Text="WPF Shift Harvey Blah" HorizontalAlignment="Center" FontSize="8" Foreground="#AAFF0000"/>
</StackPanel>
</Canvas>
</Border>
any ideas?
Thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
To solve your second question, you can bind the width and height of the StackPanel to it's parent.
<Canvas>
<StackPanel Height="{Binding ActualHeight,
RelativeSource={RelativeSource AncestorType=Canvas}}"
Width="{Binding ActualWidth,
RelativeSource={RelativeSource AncestorType=Canvas}}">
</StackPanel>
</Canvas>
After that, just make sure to set the text wrapping property on the TextBlock and you should be all set
|
|
|
|
|
Hey guys,
For some strange reason i cant seem to get events working in on of my WPF controles, its basically a calender(in progress so there isnt much happening yet) and each cell that represents a day in the month must be able to handle left and right click events.
The control uses a Grid, there are also border objects so that the grid lines are visible, and the cells representing the days have canvas objects in them.
Im sure that im overlooking something stupid, but i cant seem to figure out why the events arent firing. the control is being used in a winForms solution if thats of any help.
<Edit>
After i nested the controls properly, and then registered the event on the lowest control(in my case the border) the events worked
</Edit>
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
modified on Wednesday, August 13, 2008 10:03 AM
|
|
|
|
|
Can we use silverlight to make desktop application?
I have to make a window application and I have to develop it in Visual studio 2005 C#.
Just i was wondering will expression blend be sufficient to make a window application?
Or
If we can build in SL,
Will it be easy with compare to c#?
Believe Yourself™ ™
|
|
|
|
|
Can't you just build a WPF application?
|
|
|
|
|
Why would want to do that?
We use Silverlight for web Applications not Windows Applications
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
If you want to deliver a Silverlight application, then you may want to consider using Visual Studio 2008 and Blend.
|
|
|
|
|
how to create wpf mdi container.how to create table top computer items same buttons and how to create 3d forms(vista type)
|
|
|
|
|
how to create office 2007 background system wpf forms.
how to create animation back ground
|
|
|
|
|
|
Hi all,
If anybody implemented "google Map" or "Virtual Map" in Dot Net 3.5 (in Silverlight Beta 2).
Then Please help with code and description.
Thanks in advance.
fasih_is_my_signature
|
|
|
|
|
It's finally here!
Link[^]
modified on Tuesday, August 12, 2008 3:58 AM
|
|
|
|
|
Hi All!
Plz help me programatically & theoraticallly that how we can make a dropdown list because it is not available in the current version of silverlight.
Thanks in advance.
M.Fasih
fasih_is_my_signature
|
|
|
|
|
Hello,
It is available in Silverlight 2 RC0.
|
|
|
|
|
Hi!
My question is:
How to get the columns data(values) of selected row in a datagrid of silverlight in C# code?
My grid has multiple columns.I want to get the data of each column.
Plz also guide me if my grid columns has controls (like "TextBlock" etc)
then how to fetch data from such columns.
Please help me with code and some description.
Thanks in advance.
M.Fasih
fasih_is_my_signature
modified on Monday, August 11, 2008 7:44 AM
|
|
|
|
|
fasih1981 wrote: How to get the columns data(values) of selected row in a datagrid of silverlight in C# code?
My grid has multiple columns.I want to get the data of each column.
You can get use the DataGrid.SelectedItem property in a way like:
(dataGrid.SelectedItem as YourObject).AnyProperty
I hope this[^] article that I posted today may help you as it presents a master-detail UI using DataGrids and ListBox.
Regards,
Syed Mehroz Alam
|
|
|
|
|
Am working on a WPF application having a combobox. I have set the background of combobox to dimgray color.Currently i am using Windows Classic Theme.While working in this theme, if i disable combobox , the background will be dimgrey itself. However, if i change to Windows XP style and disable combobx, the disabled combobox is having a white background. Can we set the backcolor or the style of combobox independent of the themes. If we use Vista operating system, the same scenario can be noted.
|
|
|
|
|
i Asp.Net when i want to navigate to other page i use Responce.Redirect("abc.aspx") what should i do when i use silver light button for the same navigation on my local Host.
wasim khan
|
|
|
|
|
You can simply use:
<br />
System.Windows.Browser.HtmlPage.Window.Navigate( uri here )
Regards,
Syed Mehroz Alam
|
|
|
|