malkav
malkav
CC#
Created by malkav on 6/20/2024 in #help
WPF Styling of a button
Update to the Button Stylesheet: https://pastebin.com/YXPy0kXS
5 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
Fair enough. Thanks for sharing that docs
32 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
Yay! This worked! Thanks 😅 I just had to use Border instead of Button :catfacepalm: which I guess makes sense now
32 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
I am not using a designer 😅 I am using Rider, and afaik Rider does not have a designer
32 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
but fair enough, lemme try to fiddle around again
32 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
I've been pretty much doing the F around and find out thing 😅 I saw the border one as well, but wanted to add to the styles
32 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
How come this one uses border instead of button in the template?
32 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
I've also tried doing:
<ControlTemplate>
<!-- ... -->
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<!-- ... -->
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate>
<!-- ... -->
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<!-- ... -->
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
To no avail
32 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
I just got a little confused 😅
32 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
Isn't it in the style?
32 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Trying to edit button onMouseOver styles, but to no avail
I'm sorry, what? 😅
32 replies
CC#
Created by malkav on 6/5/2024 in #help
WPF Fonts in a ResourceDictionary
Before and after. It seems that my current approach is not working as intended. I have my /Styles/Fonts.xaml file that currently contains this: <FontFamily x:Key="RnC">./Fonts/RnC-Demo.otf#RnC Sans</FontFamily> And in my MainWindow.xaml I am trying to reach it as follows: <Button x:Name="BtnAdd" Margin="0,5,0,0" Click="BtnAdd_OnClick" FontFamily="{StaticResource RnC}">Add Name</Button>
2 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Mapping IDataReader into typed class
That was the issue, thanks!
6 replies
CC#
Created by malkav on 6/5/2024 in #help
✅ Mapping IDataReader into typed class
Am I using both? oh dear.. hang on 😅
6 replies
CC#
Created by malkav on 5/27/2024 in #help
Kusto Ingestion queue
and what's more, does the MemoryStream dispose of the used memory after usage in the query? or do I have to dispose of that memory myself still?
3 replies
CC#
Created by malkav on 5/27/2024 in #help
Kusto Ingestion queue
To note, this is my current Create method (called Queue)
public async Task<string> Queue<T>(IEnumerable<T> models)
{
using (IDataReader? response = await _kustoClient.ExecuteQueryAsync(_database, $"{_table} | count", null))
{
Console.WriteLine("\nNumber of rows in " + _table + " BEFORE ingestion:");
PrintResultsAsValueList(response);
}

foreach (T model in models)
{
Console.WriteLine("\nIngesting data from stream of models");
MemoryStream stream = new(System.Text.Encoding.UTF8.GetBytes(model.ToString()));
_ = await _kustoIngestClient
.IngestFromStreamAsync(stream, _ingestProps, new StreamSourceOptions { Size = stream.Length });

Console.WriteLine("\nWaiting 30 seconds for ingestion to complete");
Thread.Sleep(TimeSpan.FromSeconds(30));

using (IDataReader? response = await _kustoClient.ExecuteQueryAsync(_database, $"{_table} | count", null))
{
Console.WriteLine("\nNumber of rows in " + _table + " AFTER ingestion:");
PrintResultsAsValueList(response);
}
}

using (IDataReader? response = await _kustoClient.ExecuteQueryAsync(_database,
$"{_table} | top {models.Count()} by ingestion_time()", null))
{
Console.WriteLine($"\nLast {models.Count()} ingested rows:");
PrintResultsAsValueList(response);
}

return "";
}
public async Task<string> Queue<T>(IEnumerable<T> models)
{
using (IDataReader? response = await _kustoClient.ExecuteQueryAsync(_database, $"{_table} | count", null))
{
Console.WriteLine("\nNumber of rows in " + _table + " BEFORE ingestion:");
PrintResultsAsValueList(response);
}

foreach (T model in models)
{
Console.WriteLine("\nIngesting data from stream of models");
MemoryStream stream = new(System.Text.Encoding.UTF8.GetBytes(model.ToString()));
_ = await _kustoIngestClient
.IngestFromStreamAsync(stream, _ingestProps, new StreamSourceOptions { Size = stream.Length });

Console.WriteLine("\nWaiting 30 seconds for ingestion to complete");
Thread.Sleep(TimeSpan.FromSeconds(30));

using (IDataReader? response = await _kustoClient.ExecuteQueryAsync(_database, $"{_table} | count", null))
{
Console.WriteLine("\nNumber of rows in " + _table + " AFTER ingestion:");
PrintResultsAsValueList(response);
}
}

using (IDataReader? response = await _kustoClient.ExecuteQueryAsync(_database,
$"{_table} | top {models.Count()} by ingestion_time()", null))
{
Console.WriteLine($"\nLast {models.Count()} ingested rows:");
PrintResultsAsValueList(response);
}

return "";
}
3 replies
CC#
Created by malkav on 5/23/2023 in #help
❔ The search for information
I mean it's a bit of both though. My own web framework, that works together with my own CMS
20 replies
CC#
Created by malkav on 5/23/2023 in #help
❔ The search for information
@Denis you're absolutely right, but my idea is to write something akin to Orchard CMS (which is its own framework with the CMS being custom to that framework
20 replies
CC#
Created by malkav on 5/10/2023 in #help
❔ Reading multiple files/folders inside root/subfolder
So far this Blazor Project has taken me more than a month (and I'm taking the front-end from our old Svelte-Kit application) And I keep running into issues with an actual CMS on Blazor WASM, headless, and no database, and still being able to use the data in the CMS generated files inside the components 😅 Why is Blazor such a PAIN sometimes 🤣
27 replies
CC#
Created by malkav on 5/10/2023 in #help
❔ Reading multiple files/folders inside root/subfolder
I heard that if I generate everything of my WASM project as a static app, it should be able to reach the files with Directory? I'm still not sure how to do this, and I am also still not sure how to build a proper web API that can requests resources from there. Because then I'd have to have DecapCMS build all the markdown files to another API somewhere? Or maybe through the DevOps repository fetch or something... But that would still create the new problem, I need to reach all files with **/*.md 😅
27 replies