Click here to Skip to main content
14,737,485 members
Home » Discussions » C#
   

C#

 
GeneralRe: Create a Multi-Layer Data Model from a MySQL Query Pin
Richard MacCutchan7-Sep-20 10:27
mveRichard MacCutchan7-Sep-20 10:27 
GeneralRe: Create a Multi-Layer Data Model from a MySQL Query Pin
mjeeves7-Sep-20 10:44
Membermjeeves7-Sep-20 10:44 
GeneralRe: Create a Multi-Layer Data Model from a MySQL Query Pin
Richard Deeming7-Sep-20 23:34
mveRichard Deeming7-Sep-20 23:34 
QuestionProblem showing a symbol from a custom font Pin
Mc_Topaz6-Sep-20 22:18
MemberMc_Topaz6-Sep-20 22:18 
AnswerRe: Problem showing a symbol from a custom font Pin
Richard Deeming7-Sep-20 0:04
mveRichard Deeming7-Sep-20 0:04 
AnswerRe: Problem showing a symbol from a custom font Pin
Mc_Topaz7-Sep-20 0:54
MemberMc_Topaz7-Sep-20 0:54 
GeneralRe: Problem showing a symbol from a custom font Pin
Gerry Schmitz7-Sep-20 8:37
mveGerry Schmitz7-Sep-20 8:37 
GeneralRe: Problem showing a symbol from a custom font Pin
Mc_Topaz7-Sep-20 23:13
MemberMc_Topaz7-Sep-20 23:13 
I have tried this:
<Window.Resources>
    <Style x:Key="Foo">
        <Setter Property="TextElement.FontFamily" Value="pack://application:,,,/Main;component/Fonts/#MyFont" />
    </Style>
    <Style x:Key="Bar">
        <Setter Property="TextElement.FontFamily" Value="./Fonts/#MyFont" />
    </Style>
    <FontFamily x:Key="Baz">./Fonts/#MyFont</FontFamily>
</Window.Resources>
<StackPanel Orientation="Vertical">
     <TextBlock Text="" Style="{StaticResource Foo}" />
     <TextBlock Text="" Style="{StaticResource Bar}" />
     <TextBlock Text="" FontFamily="{StaticResource Baz}" />
     <TextBlock FontFamily="Segoe MDL2 Assets" Text="" />
     <TextBlock x:Name="txt1" />
     <TextBlock x:Name="txt2" />
 </StackPanel>
In the code, I have tried these different ways to set the FontFamily property. I have just listed them here. But have run them separately. All failed...
private void Window_Loaded(object sender, RoutedEventArgs e)
{
    txt1.FontFamily = new FontFamily("pack://application:,,,/Main;component/Fonts/#MyFont");
    txt1.FontFamily = new FontFamily(new Uri("pack://application:,,,/Fonts/"), "./#MyFont");
    txt1.FontFamily = new FontFamily("MyFont");
    txt1.Text = "\xe905";
}
Notice the txt1.FontFamily = new FontFamily("MyFont");
I have installed the font from it's ttf-file.
If I open the Character map application in Windows I can see all symbols that I require.
I just can't understand what is going on...
AnswerRe: Problem showing a symbol from a custom font Pin
Mc_Topaz8-Sep-20 0:52
MemberMc_Topaz8-Sep-20 0:52 
QuestionDebug does not stop on errors. Pin
MAW306-Sep-20 16:27
MemberMAW306-Sep-20 16:27 
AnswerRe: Debug does not stop on errors. Pin
Sandeep Mewara6-Sep-20 20:09
mvaSandeep Mewara6-Sep-20 20:09 
AnswerRe: Debug does not stop on errors. Pin
OriginalGriff6-Sep-20 21:32
mveOriginalGriff6-Sep-20 21:32 
SuggestionRe: Debug does not stop on errors. Pin
Richard Deeming6-Sep-20 23:38
mveRichard Deeming6-Sep-20 23:38 
GeneralRe: Debug does not stop on errors. Pin
OriginalGriff6-Sep-20 23:51
mveOriginalGriff6-Sep-20 23:51 
QuestionChanging Caption in dt Pin
MAW306-Sep-20 16:22
MemberMAW306-Sep-20 16:22 
AnswerRe: Changing Caption in dt Pin
OriginalGriff6-Sep-20 21:45
mveOriginalGriff6-Sep-20 21:45 
QuestionCan a button in a simple html-document somehow call a (clientside) C# method? Pin
arnold_w5-Sep-20 1:12
Memberarnold_w5-Sep-20 1:12 
AnswerRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
OriginalGriff5-Sep-20 1:30
mveOriginalGriff5-Sep-20 1:30 
GeneralRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
arnold_w5-Sep-20 1:36
Memberarnold_w5-Sep-20 1:36 
GeneralRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
OriginalGriff5-Sep-20 1:54
mveOriginalGriff5-Sep-20 1:54 
AnswerRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
Gerry Schmitz5-Sep-20 4:50
mveGerry Schmitz5-Sep-20 4:50 
GeneralRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
arnold_w5-Sep-20 5:33
Memberarnold_w5-Sep-20 5:33 
GeneralRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
Gerry Schmitz5-Sep-20 5:58
mveGerry Schmitz5-Sep-20 5:58 
AnswerRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
Dave Kreskowiak5-Sep-20 6:39
mveDave Kreskowiak5-Sep-20 6:39 
GeneralRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
arnold_w5-Sep-20 9:30
Memberarnold_w5-Sep-20 9:30 

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.